Fix some RNA physics accessors creating data.
Accessing data through RNA should never implicitely create it. Objects' and particles' forcefields and collision settings were doing this. Note that UI code also had to be tweaked to properly handle `None` (NULL) cases. Differential Revision: https://developer.blender.org/D11341
This commit is contained in:
@@ -79,7 +79,7 @@ class PHYSICS_PT_add(PhysicButtonsPanel, Panel):
|
||||
|
||||
col = flow.column()
|
||||
|
||||
if obj.field.type == 'NONE':
|
||||
if not obj.field or obj.field.type == 'NONE':
|
||||
col.operator("object.forcefield_toggle", text="Force Field", icon='FORCE_FORCE')
|
||||
else:
|
||||
col.operator("object.forcefield_toggle", text="Force Field", icon='X')
|
||||
|
||||
Reference in New Issue
Block a user