[Bf-blender-cvs] [16258dd] alembic_pointcache: Removed the explicit duplicache rebuild operator.

Lukas Tönne noreply at git.blender.org
Tue Mar 17 16:39:29 CET 2015


Commit: 16258ddd0372cc23db31033ea1555b83375e66d2
Author: Lukas Tönne
Date:   Tue Mar 17 16:38:31 2015 +0100
Branches: alembic_pointcache
https://developer.blender.org/rB16258ddd0372cc23db31033ea1555b83375e66d2

Removed the explicit duplicache rebuild operator.

The cache is now updated on frame changes automatically, the operator
should no longer be needed.

===================================================================

M	release/scripts/startup/bl_ui/properties_object.py
M	source/blender/editors/io/io_cache_library.c
M	source/blender/editors/io/io_cache_library.h
M	source/blender/editors/io/io_ops.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index 5a14052..165ae5a 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -295,7 +295,6 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
         elif ob.dupli_type == 'GROUP':
             layout.prop(ob, "dupli_group", text="Group")
             layout.prop(ob, "use_dupli_cache")
-            layout.operator("cachelibrary.rebuild_dupligroup")
 
 
 class OBJECT_PT_relations_extras(ObjectButtonsPanel, Panel):
diff --git a/source/blender/editors/io/io_cache_library.c b/source/blender/editors/io/io_cache_library.c
index faf1d6a..28f2fc9 100644
--- a/source/blender/editors/io/io_cache_library.c
+++ b/source/blender/editors/io/io_cache_library.c
@@ -581,43 +581,3 @@ void CACHELIBRARY_OT_archive_info(wmOperatorType *ot)
 	RNA_def_boolean(ot->srna, "use_popup", false, "Show Popup", "Display archive info in a popup");
 	RNA_def_boolean(ot->srna, "use_clipboard", false, "Copy to Clipboard", "Copy archive info to the clipboard");
 }
-
-/* ========================================================================= */
-
-static int cache_library_rebuild_dupligroup_poll(bContext *C)
-{
-	Object *ob = CTX_data_active_object(C);
-	
-	if (!(ob && (ob->transflag & OB_DUPLIGROUP) && ob->dup_group))
-		return false;
-	
-	return true;
-}
-
-static int cache_library_rebuild_dupligroup_exec(bContext *C, wmOperator *UNUSED(op))
-{
-	Scene *scene = CTX_data_scene(C);
-	Object *ob = CTX_data_active_object(C);
-	EvaluationContext eval_ctx;
-	
-	eval_ctx.mode = DAG_EVAL_VIEWPORT;
-	
-	BKE_object_dupli_cache_update(scene, ob, &eval_ctx, (float)scene->r.cfra);
-	
-	return OPERATOR_FINISHED;
-}
-
-void CACHELIBRARY_OT_rebuild_dupligroup(wmOperatorType *ot)
-{
-	/* identifiers */
-	ot->name = "Rebuild Dupligroup";
-	ot->description = "Explicitly rebuild dupligroup from cache";
-	ot->idname = "CACHELIBRARY_OT_rebuild_dupligroup";
-	
-	/* api callbacks */
-	ot->exec = cache_library_rebuild_dupligroup_exec;
-	ot->poll = cache_library_rebuild_dupligroup_poll;
-	
-	/* flags */
-	ot->flag = OPTYPE_REGISTER;
-}
diff --git a/source/blender/editors/io/io_cache_library.h b/source/blender/editors/io/io_cache_library.h
index 72b45ee..29c2e68 100644
--- a/source/blender/editors/io/io_cache_library.h
+++ b/source/blender/editors/io/io_cache_library.h
@@ -38,7 +38,6 @@ void CACHELIBRARY_OT_delete(struct wmOperatorType *ot);
 void CACHELIBRARY_OT_item_enable(struct wmOperatorType *ot);
 
 void CACHELIBRARY_OT_bake(struct wmOperatorType *ot);
-void CACHELIBRARY_OT_rebuild_dupligroup(struct wmOperatorType *ot);
 
 void CACHELIBRARY_OT_archive_info(struct wmOperatorType *ot);
 
diff --git a/source/blender/editors/io/io_ops.c b/source/blender/editors/io/io_ops.c
index de6d675..4f4d3e7 100644
--- a/source/blender/editors/io/io_ops.c
+++ b/source/blender/editors/io/io_ops.c
@@ -43,7 +43,6 @@ void ED_operatortypes_io(void)
 	WM_operatortype_append(CACHELIBRARY_OT_delete);
 	WM_operatortype_append(CACHELIBRARY_OT_item_enable);
 	WM_operatortype_append(CACHELIBRARY_OT_bake);
-	WM_operatortype_append(CACHELIBRARY_OT_rebuild_dupligroup);
 	WM_operatortype_append(CACHELIBRARY_OT_archive_info);
 
 #ifdef WITH_COLLADA




More information about the Bf-blender-cvs mailing list