schellicon Posted September 24, 2021 Report Share Posted September 24, 2021 in Grow Fx 1.9.9 is there a script way to get the path to which distributer path is assigned to ? something like : ($.getPath 2).PathPosDistr_01.PARAMETER_Path_Position .name / .pathnumber yours Schellicon Quote Link to comment Share on other sites More sharing options...
Eduard Posted September 24, 2021 Report Share Posted September 24, 2021 Hi schellicon, You can only specify the path that will be used for distribution: <growfx>.<path>.<distributor>.AddStartPath <path_index_integer> But if you really need it, we can add these properties. Thanks! Quote Link to comment Share on other sites More sharing options...
schellicon Posted September 24, 2021 Author Report Share Posted September 24, 2021 would be nice to have that , then i can finish my script and don`t need to make a suboptimal workaround Thanks!! Quote Link to comment Share on other sites More sharing options...
Eduard Posted September 26, 2021 Report Share Posted September 26, 2021 Hi schellicon, Ok, we've added the following functions for Path and PathPosition distributors: <growfx>.<path>.<distributor>.AddParentPath <path_index_integer> - this is the same as AddStartPath; <growfx>.<path>.<distributor>.GetNumParentPaths() - returns the number of parent paths; <growfx>.<path>.<distributor>.GetParentPath <parentpath_index_integer> - returns the path object as a ReferenceTarget; <growfx>.<path>.<distributor>.GetParentPathIndex <parentpath_index_integer> - returns the index of path; Will this be OK for you? I can quickly send you an update, please let me know your version of 3dsMax. Thanks! Quote Link to comment Share on other sites More sharing options...
schellicon Posted September 27, 2021 Author Report Share Posted September 27, 2021 Hi Eduard, This is looking fine to me. I`m working with 3dsmax 2022 Thank you for this fast response!! Quote Link to comment Share on other sites More sharing options...
Eduard Posted September 27, 2021 Report Share Posted September 27, 2021 Hi schellicon, Ok, I sent you an update. Thanks! Quote Link to comment Share on other sites More sharing options...
schellicon Posted October 2, 2021 Author Report Share Posted October 2, 2021 everything is working, exept <growfx>.<path>.<distributor>.GetParentPath it throws an error : -- Known system exception -- ######################################################################## -- Address: 0xcdce2de8; nCode: 0x00000000C0000005 -- Desc: EXCEPTION_ACCESS_VIOLATION The thread tried to read from or write to a virtual address for which it does not have the appropriate access. -- Read of Address: 0x0000000000000018 -- ######################################################################## -- MAXScript callstack: -- thread data: threadID:35040 -- ------------------------------------------------------ -- [stack level: 0] -- In top-level -- ######################################################################## -- C++ callstack: -- (GrowFX_old): (filename not available): LibVersion -- (GrowFX_old): (filename not available): LibVersion -- (MAXScrpt): (filename not available): Generic::apply -- (MAXScrpt): (filename not available): CodeTree::eval -- (MAXScrpt): (filename not available): SourceFileWrapper::eval -- (MAXScrpt): (filename not available): IsMAXScriptListenerInViewport -- (USER32): (filename not available): ScreenToClient -- (USER32): (filename not available): ScreenToClient -- (USER32): (filename not available): ScreenToClient -- (USER32): (filename not available): CallWindowProcW -- (USER32): (filename not available): CallWindowProcW -- (UIControls): (filename not available): (function-name not available) -- (UIControls): (filename not available): (function-name not available) -- (USER32): (filename not available): CallWindowProcW -- (USER32): (filename not available): DispatchMessageW -- (USER32): (filename not available): IsDialogMessageW -- (3dsmax): (filename not available): XMLAnimTreeEntry::GetUnique -- (3dsmax): (filename not available): Frustum::operator= -- (Qt5Core): (filename not available): QObject::qt_static_metacall -- (Qt5Core): (filename not available): QEventDispatcherWin32::preProcessNativeEvent -- (Qt5Core): (filename not available): QEventDispatcherWin32::processEvents -- (qwindows): (filename not available): qt_plugin_query_metadata -- (Qt5Core): (filename not available): QEventLoop::exec -- (Qt5Core): (filename not available): QCoreApplication::exec -- (3dsmax): (filename not available): Frustum::operator= -- (3dsmax): (filename not available): NodeAndAnims::SetNode -- (3dsmax): (filename not available): UtilGfx::InitRectIPoint3 -- ######################################################################## however...but i don`t know , i think we don`t need it, because: <growfx>.<path>.<distributor>.GetParentPathIndex index gets the path index.. so :<growfx>.getpath index gets the reference so i think you can remove <growfx>.<path>.<distributor>.GetParentPath Thank you for your fast help!!! Quote Link to comment Share on other sites More sharing options...
Eduard Posted October 3, 2021 Report Share Posted October 3, 2021 Hi schellicon, I wonder why this happened... Can you send me your model and a script line with the GetParentPath function so I can test this? Thanks! Quote Link to comment Share on other sites More sharing options...
schellicon Posted October 3, 2021 Author Report Share Posted October 3, 2021 Hi Eduard, i attached a simple growfx example and the script to test My Test Scene is nothing special , it`s just to see something. Max file is a 2022 Version and growfx is a version 2 install. i also tested everything with some libary plants , but got the same result yours Schellicon distributer_test.max distributer_test.ms Quote Link to comment Share on other sites More sharing options...
Eduard Posted October 3, 2021 Report Share Posted October 3, 2021 Ok, I fixed this bug. But I also saw an error in your code: distnum=gfx.getNumDistributors i for j=1 to distnum do ( -- ... dist.GetParentPath j -- Here "j" must be in the range from 1 to dist.GetNumParentPaths(), and not to getNumDistributors ) If you want I can send the update again. Thanks for your bug report! Quote Link to comment Share on other sites More sharing options...
schellicon Posted October 3, 2021 Author Report Share Posted October 3, 2021 Wow that was fast!! and yeah getnumparentpath and GetParentPath i have missunderstood. thank you for implementing this for us!! of course i would be happy to get the update Quote Link to comment Share on other sites More sharing options...
Eduard Posted October 3, 2021 Report Share Posted October 3, 2021 Ok, I've sent you an update. Thanks! Quote Link to comment Share on other sites More sharing options...
schellicon Posted October 3, 2021 Author Report Share Posted October 3, 2021 thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.