3
$\begingroup$

Almost everything is in the question. I've been browsing the web for a while and couldn't find out a way to hide or at least disable the Properties Transform Panel of the 'View_3D' area. Is there a way to redraw (override the draw) entirely this Panel, by the way? I need the user to be unable to transform the objects otherwise, but by using my custom tools. I've been able to remove every other Panel but this one. Any brilliant idea?

Also, is there a way to simply remove this whole area (and replace it by a new fresh one), or even better redraw completely the area?

$\endgroup$
4
  • $\begingroup$ Do you still need an answer? $\endgroup$ Commented Jan 11, 2016 at 20:06
  • $\begingroup$ Absolutely, I finally left this panel accessible, and spend my time to develop my application. But in the end, I'll need do it. So I'll be very thankful if you can help with this. Thanks. $\endgroup$ Commented Jan 11, 2016 at 21:25
  • $\begingroup$ do you want to draw is somewhere else? $\endgroup$ Commented Jan 11, 2016 at 21:59
  • $\begingroup$ Perhaps this helps : blenderartists.org/t/removing-an-existing-panel/693294/3 $\endgroup$
    – commonpike
    Commented Oct 5 at 9:42

1 Answer 1

-1
$\begingroup$

I use this to draw it in the tool shelve

class ObjectTransformation(bpy.types.Panel):
    bl_label = "Transformation"
    bl_idname = "Transformation"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'
    bl_category = "Modeling Toolbox"

    def draw(self, context):
        layout = self.layout
        obj = context.object
        row = layout.row()
        row.column().prop(obj, "location")
        row.column().prop(obj, "rotation_euler", text="Rotation")
        row.column().prop(obj, "scale")
        row = layout.row()
        #Calls the CTRL A menu
        #row.operator("wm.call_menu", text="Apply Tans").name="VIEW3D_MT_object_apply"
        row.operator("object.transform_apply", text="Apply Rot").rotation=True
        row.operator("object.transform_apply", text="Apply Scale").scale=True
        row = layout.row()
        row.column().prop(obj, "dimensions")
$\endgroup$
6
  • 1
    $\begingroup$ OK, thanks for sharing. I might be missing something, but drawing another Transform Panel in the Toolshelves region, won't make it disappear from the Properties region. I don't really see what part of my question you are answering here. I think we misunderstood each other, or my question was unclear, but my point was: How do I hide the default Transform Panel? $\endgroup$ Commented Jan 12, 2016 at 13:19
  • $\begingroup$ To my understanding the trans tap in properties panel is hard coded and not scripted. I looked into space_view3d.py and did not see it being mentioned. $\endgroup$ Commented Jan 12, 2016 at 15:37
  • $\begingroup$ Yep. As far as I have been digging there was no other way than changing (a few) things in a couple of C files and recompile Blender. But I was hopping some pythonic trick could help with overriding/redrawing the content of the whole Property region. Thanks anyway. Cheers. $\endgroup$ Commented Jan 12, 2016 at 20:40
  • $\begingroup$ I also looked at space_view3d.py and didn't find anything about transforms. However, for the future, if you want to remove a panel, you just need to unregister the class it's associated with. For example, Name Panel addon replaces the default name panel in properties region, then registers its own panel. You can see that code here: github.com/trentinfrederick/name-panel/blob/master/… - Transform and View panels are the only ones I can't find info for, so they likely link to much deeper data in blender. $\endgroup$
    – Italic_
    Commented Mar 3, 2016 at 23:35
  • 2
    $\begingroup$ Have it. It's the class view3d_panel_transform in the view3d_buttons.c File. Line 1137 bis 1172. Plus line 1182. pt->draw = view3d_panel_transform; . And there are of course some more classes called from the class view3d_panel_transform class. Which you might want to delete too. But it's enough to turn off the class view3d_panel_transform to hide the panel from the Properties sidebar. This class can by the way not be accessed by Python. And so not be unregistered. Original comment from the c file: /* XXX C panels not available through RNA (bpy.types)! */ $\endgroup$
    – Tiles
    Commented Jul 31, 2016 at 9:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .