Fix T52148: Point Density Texture ID User decrement error related to the Object field.
Note that fix is not perfect, systematically make refcounting of all IDs assigned to node's id pointer, which breaks the 'do not refcount scene/object/text datablocks' principle... But besides that principle being far from ideal in general, it becomes pretty much impossible to apply when using //generic// ID pointer, unless we add some kind of type data to that pointer somehow. So for now, better to live with that, than having broken usercount.
This commit is contained in:
parent
d41acacc61
commit
05f377805b
Notes:
blender-bot
2023-02-14 11:08:33 +01:00
Referenced by issue #52148, Point Density Texture ID User decrement error related to the Object field
|
@ -3339,7 +3339,7 @@ static void def_frame(StructRNA *srna)
|
|||
prop = RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "id");
|
||||
RNA_def_property_struct_type(prop, "Text");
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT);
|
||||
RNA_def_property_ui_text(prop, "Text", "");
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
|
||||
|
@ -3609,7 +3609,7 @@ static void def_sh_lamp(StructRNA *srna)
|
|||
prop = RNA_def_property(srna, "lamp_object", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "id");
|
||||
RNA_def_property_struct_type(prop, "Object");
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT);
|
||||
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Lamp_object_poll");
|
||||
RNA_def_property_ui_text(prop, "Lamp Object", "");
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
|
@ -3983,7 +3983,7 @@ static void def_sh_tex_coord(StructRNA *srna)
|
|||
prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "id");
|
||||
RNA_def_property_struct_type(prop, "Object");
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT);
|
||||
RNA_def_property_ui_text(prop, "Object", "Use coordinates from this object (for object texture coordinates output)");
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
|
||||
|
@ -4099,7 +4099,7 @@ static void def_sh_tex_pointdensity(StructRNA *srna)
|
|||
prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "id");
|
||||
RNA_def_property_struct_type(prop, "Object");
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT);
|
||||
RNA_def_property_ui_text(prop, "Object", "Object to take point data from");
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
|
||||
|
@ -4796,7 +4796,7 @@ static void def_cmp_render_layers(StructRNA *srna)
|
|||
RNA_def_property_pointer_sdna(prop, NULL, "id");
|
||||
RNA_def_property_pointer_funcs(prop, NULL, "rna_Node_scene_set", NULL, NULL);
|
||||
RNA_def_property_struct_type(prop, "Scene");
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT);
|
||||
RNA_def_property_ui_text(prop, "Scene", "");
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_scene_layer_update");
|
||||
|
||||
|
@ -5453,7 +5453,7 @@ static void def_cmp_defocus(StructRNA *srna)
|
|||
RNA_def_property_pointer_sdna(prop, NULL, "id");
|
||||
RNA_def_property_pointer_funcs(prop, NULL, "rna_Node_scene_set", NULL, NULL);
|
||||
RNA_def_property_struct_type(prop, "Scene");
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT);
|
||||
RNA_def_property_ui_text(prop, "Scene", "Scene from which to select the active camera (render scene if undefined)");
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
|
||||
|
|
Loading…
Reference in New Issue