Notifications
Clear all

[Closed] When object deleted, delete children. Huh?

Um… you said it can be fixed, but how?

Before, you offered the solution of

#1 on predelete callback collect all nodes that have to be deleted with the deleting node
#2 on postdelete callback check the list of nodes that have to be deleted, remove all already deleted and delete the rest.

But the code you provided already does that and it’s still crashing. So… huh?? What am I missing?

let’s fix the easier part… redo issue.
do you remember when you’ve asked about my ‘voodoo’ with theHold? ok…
change the last code to:

fn preDeleteWholeClass = if not theHold.Redoing() do ...

the next is how to avoid deleting of what was already deleted… any ideas?

I /was/ actually talking about the redo issue.

And my first impulse would be

		if isValidNode n do
		(
			if (isDeleted n) then
			(
				deleteItem nodesForDeletion i
			)
			else
			(
				delete n
			)
		)

But that does not work.

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

is the REDO issue fixed now? yes, it is. so… you can trust me that “double-del” issue will be solved as well
i’ve asked about any ideas how to do it…
i have three:
#1
ask your company software engineers for support… they probably will help you. but they might ask you for … hmm… dance, kiss… but it’s too offensive
#2

#2
sit and learn c++ and max SDK. but it might take a long time
and … the #3

#3 is … think
that’s what i prefer to do

our idea is perfect. we are collecting all nodes which have to be deleted after their target nodes were deleted, and delete them
sounds good. right? our problem is how to filter nodes those have already been deleted

c’mon! think!

where is the problem of using the pair “node pre deleted/node post deleted”?
we NEED AN EVENT THAT SAYS THAT ALL NODES OF CURRENT DELETING SESSION WERE DELETED
and use this event to delete all nodes associated with deleted

First off… delete something, undelete, redo, using the code you gave me (the one with the rows-of-like-objects), still crashes Max.

Second, shouldn’t (isDeleted obj) be the method used to determine if something has been deleted??

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

that’s the max global bug. ISDELETED doesn’t work… according to the max nodes are not deleted at the pre-deleted stage and … technically can be deleted

it doesn’t.

Page 8 / 10