diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-07-15 15:18:30 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-07-15 15:23:35 +0300 |
commit | e8f8c13d4b76ba587ef7cf33370b286d4fbd36bc (patch) | |
tree | 371472ae220ad8740b310aaa8f4c5746448302c5 /source/blender/editors/object/object_constraint.c | |
parent | 0c062a9e082130212447c2b67e8e16b8a2e622d1 (diff) | |
parent | 44bb73e765a6f79bc14a46449368f83e572d8bad (diff) |
PointCloud: Initial rendering support for Workbenchtmp-pointcloud-render
Also includes outline overlays. Removes the temp overlay drawing
We make the geometry follow camera like billboards this uses less
geometry. Currently we use half octahedron for now. Goal would be
to use icospheres.
This patch also optimize the case when pointcloud has uniform radius.
However we should premultiply the radius prop by the default radius
beforehand to avoid a multiplication on CPU.
Differential Revision: https://developer.blender.org/D8301
Diffstat (limited to 'source/blender/editors/object/object_constraint.c')
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 3618eae7db9..90ea71ae5c5 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -670,12 +670,12 @@ static bool edit_constraint_poll_generic(bContext *C, StructRNA *rna_type) if (!ob) { CTX_wm_operator_poll_msg_set(C, "Context missing active object"); - return 0; + return false; } if (ID_IS_LINKED(ob) || (ptr.owner_id && ID_IS_LINKED(ptr.owner_id))) { CTX_wm_operator_poll_msg_set(C, "Cannot edit library data"); - return 0; + return false; } if (ID_IS_OVERRIDE_LIBRARY(ob) && ptr.data != NULL) { @@ -683,7 +683,7 @@ static bool edit_constraint_poll_generic(bContext *C, StructRNA *rna_type) return (((bConstraint *)ptr.data)->flag & CONSTRAINT_OVERRIDE_LIBRARY_LOCAL) != 0; } - return 1; + return true; } static bool edit_constraint_poll(bContext *C) @@ -702,7 +702,7 @@ static void edit_constraint_properties(wmOperatorType *ot) RNA_def_property_flag(prop, PROP_HIDDEN); } -static int edit_constraint_invoke_properties(bContext *C, wmOperator *op) +static bool edit_constraint_invoke_properties(bContext *C, wmOperator *op) { PointerRNA ptr = CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint); Object *ob = (ptr.owner_id) ? (Object *)ptr.owner_id : ED_object_active_context(C); @@ -711,7 +711,7 @@ static int edit_constraint_invoke_properties(bContext *C, wmOperator *op) if (RNA_struct_property_is_set(op->ptr, "constraint") && RNA_struct_property_is_set(op->ptr, "owner")) { - return 1; + return true; } if (ptr.data) { @@ -727,10 +727,10 @@ static int edit_constraint_invoke_properties(bContext *C, wmOperator *op) RNA_enum_set(op->ptr, "owner", EDIT_CONSTRAINT_OWNER_BONE); } - return 1; + return true; } - return 0; + return false; } static bConstraint *edit_constraint_property_get(wmOperator *op, Object *ob, int type) @@ -1683,7 +1683,7 @@ void OBJECT_OT_constraints_clear(wmOperatorType *ot) /* callbacks */ ot->exec = object_constraints_clear_exec; - ot->poll = ED_operator_object_active_editable; + ot->poll = ED_operator_object_active_local_editable; } /** \} */ |