Jump to content

scipting Path distributer


schellicon

Recommended Posts

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!

 

 

 

Link to comment
Share on other sites

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!!!

 

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...