From f3a7290812a1b49e522dcfccdc224e6f17b7b3c7 Mon Sep 17 00:00:00 2001 From: Anas RAR Date: Mon, 2 Nov 2020 12:42:41 +0700 Subject: [PATCH 1/3] IMPROVE : now bake can be on any mode --- ReNimNode/production/editorType_operator.py | 26 +++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/ReNimNode/production/editorType_operator.py b/ReNimNode/production/editorType_operator.py index 63b19f3..cacf6b5 100644 --- a/ReNimNode/production/editorType_operator.py +++ b/ReNimNode/production/editorType_operator.py @@ -339,6 +339,21 @@ def execute(self, context): target_object = socket_node.target_object source_object = socket_node.source_object + # store current mode + old_mode = 'OBJECT' + + # store current active object + old_active_object = context.active_object + + # change mode to object if current mode is not object + if bpy.context.mode != "OBJECT": + # overide current mode if not object + old_mode = context.active_object.mode if context.active_object else context.mode + bpy.ops.object.mode_set(mode='OBJECT') + + # store selected object for seamless binding + selected_objects = context.selected_objects + # deselect all objects bpy.ops.object.select_all(action='DESELECT') @@ -441,6 +456,17 @@ def execute(self, context): # change to pose mode bpy.ops.object.mode_set(mode='OBJECT') + # restore selected objects + for obj in selected_objects: + obj.select_set(True) + + # change active object to old object + context.view_layer.objects.active = old_active_object + + # change to old mode if not object + if old_mode != "OBJECT": + bpy.ops.object.mode_set(mode=old_mode) + if self.unbind_after_bake: # unnbind after bake its true bpy.ops.renim.bind(node_tree_name=self.node_tree_name, node_object_name=self.node_object_name) From d798496823c384c118d5557ede121a4225c61aa4 Mon Sep 17 00:00:00 2001 From: Anas RAR Date: Mon, 2 Nov 2020 12:43:19 +0700 Subject: [PATCH 2/3] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8a38778..26083d1 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ - No worry about bone orientation and scale. - The purpose is to retarget animation and clean up action with **NLA Editor** -## Current Version : 0.0.1 +## Current Version : 0.1.0 ## Feature From 7631d555b8aff143954d1bbc1354b1296bc4f785 Mon Sep 17 00:00:00 2001 From: Anas RAR Date: Mon, 2 Nov 2020 12:49:10 +0700 Subject: [PATCH 3/3] update readme --- README.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 26083d1..41ece7b 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,12 @@ Retarget system originally from my previous project **[Blender UE4 Workspace](ht ## Installation -Edit 🡆 Preferences 🡆 Add-ons 🡆 Install 🡆 Select **ReNimNode.zip** 🡆 Install Add-ons. +- Edit. +- Preferences. +- Add-ons. +- Install. +- Select **ReNimNode.zip**. +- Install Add-ons. ## How To Use @@ -52,7 +57,16 @@ Change editor type to **Retarget Animation Node**. ### Mapping Bone -New 🡆 Add 🡆 Object 🡆 **Target And Source Object** 🡆 Fill Target And Source 🡆 Select Target And Source Armature 🡆 Change Mode To **Pose** 🡆 Select The Bone Target First And Then Select The Source Bone 🡆 **Create Bone Node From Selected Bones** 🡆 Change Mode To **Object** 🡆 **BIND**. +- New. +- Add. +- Object. +- **Target And Source Object**. +- Fill Target And Source. +- Select Target And Source Armature. +- Change Mode To **Pose**. +- Select The Bone Target And Select The Source Bone. +- **Create Bone Node From Selected Bones**. +- **BIND**. **NOTE** : You can mapping bone when the object node is binding. @@ -60,12 +74,12 @@ New 🡆 Add 🡆 Object 🡆 **Target And Source Object** 🡆 Fill Targ ### Bake Action -Change Mode To **Object** 🡆 **BAKE ACTION** +**BAKE ACTION** **NOTE** : -- You can add additional bone to bake -- You need **UNBIND** to view baked action +- You can add additional bone to bake. +- You need **UNBIND** to view baked action. ![ReNim Node Bake](doc_assets/bake.gif)