add template in create output path base node
templates for slot are in code but disabled, not useful in the end
This commit is contained in:
+39
-1
@@ -1,5 +1,6 @@
|
||||
import bpy
|
||||
|
||||
from bpy.types import Operator
|
||||
from bpy.props import (BoolProperty,
|
||||
EnumProperty,
|
||||
PointerProperty,
|
||||
@@ -8,7 +9,7 @@ from bpy.props import (BoolProperty,
|
||||
|
||||
from .. import fn
|
||||
|
||||
class RT_OT_select_object_by_name(bpy.types.Operator):
|
||||
class RT_OT_select_object_by_name(Operator):
|
||||
bl_idname = "rt.select_object_by_name"
|
||||
bl_label = "Select Object By name"
|
||||
bl_description = "Select object and modifier"
|
||||
@@ -41,6 +42,7 @@ class RT_OT_select_object_by_name(bpy.types.Operator):
|
||||
return {'CANCELLED'}
|
||||
|
||||
# Make it the active object
|
||||
## function to make active and selected
|
||||
# fn.show_and_active_object(context, target_object, make_active=True, )
|
||||
context.view_layer.objects.active = target_object
|
||||
|
||||
@@ -64,8 +66,44 @@ class RT_OT_select_object_by_name(bpy.types.Operator):
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
class RT_OT_info_note(Operator):
|
||||
bl_idname = "rt.info_note"
|
||||
bl_label = "Info Note"
|
||||
bl_description = "Info Note"
|
||||
bl_options = {"REGISTER", "INTERNAL"}
|
||||
|
||||
text : bpy.props.StringProperty(default='', options={'SKIP_SAVE'})
|
||||
title : bpy.props.StringProperty(default='Help', options={'SKIP_SAVE'})
|
||||
icon : bpy.props.StringProperty(default='INFO', options={'SKIP_SAVE'})
|
||||
|
||||
@classmethod
|
||||
def description(self, context, properties):
|
||||
return properties.text
|
||||
|
||||
def execute(self, context):
|
||||
## Split text in list of lines to display
|
||||
lines = self.text.split('\n')
|
||||
fn.show_message_box(_message=lines, _title=self.title, _icon=self.icon)
|
||||
return {"FINISHED"}
|
||||
|
||||
# Not registered yet
|
||||
class RT_set_env_settings(bpy.types.Operator):
|
||||
"""manually reset environnement settings"""
|
||||
bl_idname = "rt.set_env_settings"
|
||||
bl_label = "Reset Templates From Env"
|
||||
bl_description = "Reset Render Toolbox templates from environment variables"
|
||||
bl_options = {"REGISTER", "UNDO", "INTERNAL"}
|
||||
|
||||
# mode : bpy.props.StringProperty(default='ALL', options={'SKIP_SAVE'}) # 'HIDDEN',
|
||||
|
||||
def execute(self, context):
|
||||
from ..properties import set_env_properties
|
||||
set_env_properties()
|
||||
return {'FINISHED'}
|
||||
|
||||
classes = (
|
||||
RT_OT_select_object_by_name,
|
||||
RT_OT_info_note
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user