is_updated is not set by modifier changes #44506

Closed
opened 2015-04-24 12:38:47 +02:00 by Andrej Ivanis · 7 comments

is_updated is not set by modifier changes update_bug.blend

Open the file and terminal
Run the script (prints 'UPDATED. YEEE!' when object is_updated)
Try changing array modifier count and nothing will be printed on the terminal

OS X 10.9.5
Blender 2.74

is_updated is not set by modifier changes [update_bug.blend](https://archive.blender.org/developer/F166471/update_bug.blend) Open the file and terminal Run the script (prints 'UPDATED. YEEE!' when object is_updated) Try changing array modifier count and nothing will be printed on the terminal OS X 10.9.5 Blender 2.74
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @aivanis

Added subscriber: @aivanis

Added subscribers: @Sergey, @ideasman42, @mont29

Added subscribers: @Sergey, @ideasman42, @mont29

Not quite sure there is any bug here… is_updated is just an internal state meaning that some data (object in this case) update is pending, if update happens before your callback is called, the flag is cleared and you “detect” nothing.

Adding Sergey and Campbell as CCs here, they know that code much better than me…

Not quite sure there is any bug here… is_updated is just an internal state meaning that some data (object in this case) update is pending, if update happens before your callback is called, the flag is cleared and you “detect” nothing. Adding Sergey and Campbell as CCs here, they know that code much better than me…
Author

I'm not sure if this is right, but according to the wiki for the implementation of is_updated this should work
http://wiki.blender.org/index.php/Dev:2.6/Source/Render/UpdateAPI

The dependency graph now flushes the LIB_ID_RECALC flag, which means we can use it to detect if a datablock was updated, requiring e.g. a recalculation of constraints, modifiers, etc.

It makes sense that modifiers set objects is_updated as they don't have separate is_updated variable, otherwise you can't detect a change in modifier.

I'm not sure if this is right, but according to the wiki for the implementation of is_updated this should work http://wiki.blender.org/index.php/Dev:2.6/Source/Render/UpdateAPI ``` The dependency graph now flushes the LIB_ID_RECALC flag, which means we can use it to detect if a datablock was updated, requiring e.g. a recalculation of constraints, modifiers, etc. ``` It makes sense that modifiers set objects is_updated as they don't have separate is_updated variable, otherwise you can't detect a change in modifier.
Sergey Sharybin self-assigned this 2015-04-28 00:38:12 +02:00

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

Ok, it's actually simple one :) And it's not a bug.

In blender we've got separate concept "object is modified" (which includes transform, parneting etc) and "object data is modified" (which includes geometry). When you're changing modifier's settings you\re only affecting on geometry data, object transform stays the same. Which makes objects to be tagged for only update data.

To catch those changes you can check for if object.is_updated or object.is_updated_data.

So thanks for the report, but it actually works as expected.

Ok, it's actually simple one :) And it's not a bug. In blender we've got separate concept "object is modified" (which includes transform, parneting etc) and "object data is modified" (which includes geometry). When you're changing modifier's settings you\re only affecting on geometry data, object transform stays the same. Which makes objects to be tagged for only update data. To catch those changes you can check for `if object.is_updated or object.is_updated_data`. So thanks for the report, but it actually works as expected.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#44506
No description provided.