I am creating a pie menu to access my most frequently used nodes in my node editor. I have successfully created pie menu but it doesn't have "use_transform" property set to "True" which enables us to drag and place nodes as soon as they are called. Nodes called from blender menu and shortcuts assigned to nodes does have "use_transform" property set to "True", but I want to know how to access that property through pie menu.  SAMPLE CODE....  bl_info = {     "name": "My test Modifiers CTRL SPACE",     "author": "Vikrant",     "version": (1),     "blender": (2, 79, 0),     "description": "Pie menu for modifiers",     "category": "User Interface" }   import bpy from bpy.types import Menu  # TEST Pie Menu for Node editor  class An_Nodes(Menu):     # label is displayed at the center of the pie menu.     bl_idname = "An_Nodes"     bl_label = "NODES"     def draw(self, context):         layout = self.layout         pie = layout.menu_pie() #4         pie.operator("node.add_node", text="Test").type='ShaderNodeValue'         ##############         #FORMATS I HAVE TRIED         ##############         #pie.operator("node.add_node", text="Test").type='ShaderNodeValue'.use_transform=True         #pie.operator("node.add_node", text="Test")(.type='ShaderNodeValue'.use_transform=True)         #pie.operator(("node.add_node", text="Test").type='ShaderNodeValue').use_transform=True         #pie.operator("node.add_node", text="Test").type='ShaderNodeValue'.use_transform=True         #############             #Where &amp; how to place this "use_transform=True" to eneable the node to be moved as soon as it is accessed via pie menu #6         pie.operator("node.add_node", text="Test").type='ShaderNodeGamma'  classes = (     An_Nodes,     )   addon_keymaps = []   def register():     for cls in classes:         bpy.utils.register_class(cls)      wm = bpy.context.window_manager     if wm.keyconfigs.addon:         km = wm.keyconfigs.addon.keymaps.new(name='Node Generic', space_type='NODE_EDITOR', region_type='WINDOW')         kmi = km.keymap_items.new('wm.call_menu_pie', 'SPACE', 'PRESS', ctrl=True, shift=True)         kmi.properties.name = "An_Nodes"         addon_keymaps.append((km, kmi))  def unregister():     for cls in classes:         bpy.utils.unregister_class(cls)      wm = bpy.context.window_manager     kc = wm.keyconfigs.addon     if kc:         for km, kmi in addon_keymaps:             km.keymap_items.remove(kmi)     addon_keymaps.clear()   if __name__ == "__main__":     register()
50281
Basically, I want to have a single operator which can do multiple things, based on some attributes values.  class MyPanel(bpy.types.Panel):     # (...)     layout = self.layout     row = layout.row()     row.operator("my.button", text="Button text")  class MY_BUTTON_OT_Button(bpy.types.Operator):     bl_idname = "my.button"     bl_description = "Button description"     bl_label = "Button"     foo = bpy.props.IntProperty()     bar = bpy.props.BoolProperty()      if bar:         # Do something with foo     else:         # Do something else :P   I know how to set one attribute, like so:      row.operator("my.button", text="Button text").foo=5   But what about multiple arguments? I tried several things that didn't worked, like (e.g.):   With setattr(): row.operator("my.button", text="Button text").setattr(foo=5,bar=True)   With a custom method setVal() in the operator class: row.operator("my.button", text="Button text").setVal(foo=5,bar=True)   Maybe I must use a single EnumProperty? I hope to avoid this, so my question is: Is it possible to pass multiple custom arguments to set attributes in an operator class? And if yes, how ?  Thanks for your help.
823
I'm stuck in full screen in the node editor. Escape isn't working, and I have no menus and no idea how to leave except to quit Blender and reopen the program.
75029
I'm new to LaTeX and need some help with my figures. I would like to to put small numbers outside the pie slices without making a mess. Having found this thread , I tried it out, but didn't get all the way through with it. Right now, my pie looks like this:    I used the following code:  \usepackage{tikz,stackengine} \makeatletter  \tikzstyle{chart}= [legend label/.style={font={\scriptsize},anchor=west,align=left}, legend box/.style={rectangle, draw, minimum size=5pt}, axis/.style={black,thin,-&gt;}, axis label/.style={anchor=east,font={\tiny}}]  \tikzstyle{bar chart}=[ chart, bar width/.code={     \pgfmathparse{##1/2}     \global\let\bar@w\pgfmathresult}, bar/.style={thin, draw=black}, bar label/.style={font={\bf\small},anchor=north}, bar value/.style={font={\footnotesize}}, bar width=.75,]  \tikzstyle{pie chart}= [chart, slice/.style={line cap=round, line join=round, thin, draw=black}, pie title/.style={font={}}, slice type/.style 2 args={     ##1/.style={fill=##2},     values of ##1/.style={}}]  \pgfdeclarelayer{background} \pgfdeclarelayer{foreground} \pgfsetlayers{background,main,foreground}  \newcommand{\pye}[3][]{     \begin{scope}[#1]         \pgfmathsetmacro{\curA}{90}         \pgfmathsetmacro{\r}{1}         \def\c{(0,0)}         \node[pie title] at (270:1.3) {#2};         \foreach \v/\s in{#3}{             \pgfmathsetmacro{\deltaA}{\v/100*360}             \pgfmathsetmacro{\nextA}{\curA + \deltaA}             \pgfmathsetmacro{\midA}{(\curA+\nextA)/2}             \path[slice,\s] \c             -- +(\curA:\r)             arc (\curA:\nextA:\r)             -- cycle;             \pgfmathsetmacro{\d}{max((\deltaA * -(.5/50) + 1) , .5)} %%%              %\pgfmathprintnumberto{#3}{\fnum}  %\ifthenelse{\lengthtest{#3 pt &lt; 10pt}} %{\path (O) -- ++ (\midangle:\radius) %node[inner sep=0,align=left,anchor=west,rotate=\midangle](nums#3)    {~~\fnum};} %{\path (O) -- ++(\midangle:\innerpos)  %node {\scalefont{#3}\beforenumber\fnum\afternumber};}           %%%                         \begin{pgfonlayer}{foreground}                 \path \c -- node[pos=\d,pie values,values of \s]{$\v\%$} +    (\midA:\r);             \end{pgfonlayer}             \global\let\curA\nextA}     \end{scope}}  \newcommand{\legend}[2][]{     \begin{scope}[#1]         \path         \foreach \n/\s in {#2}         {++(0,-5pt) node[\s,legend box] {} +(2pt,0) node[legend label]     {\n}};     \end{scope}}      \begin{document}         \begin{center}      \begin{figure}[H]     \centering \begin{tikzpicture} [pie chart, slice type={A}{black!0}, slice type={B}{black!10}, slice type={C}{black!20}, slice type={D}{black!30}, slice type={E}{black!40}, slice type={F}{black!50}, slice type={G}{black!60}, slice type={H}{black!70}, pie values/.style={font={\small}}, scale=2]  \pye{1994}{6.1/A, 2.9/B, 0.2/C, 54.3/D, 25.2/E, 1.4/F, 6.7/G, 3.2/H} \pye[xshift=2.2cm,values of coltello/.style={pos=1.1}]% {2005}{6.8/A, 3.0/B, 0.5/C, 52.3/D, 25.6/E, 1.8/F, 7.1/G, 2.8/H} \pye[xshift=4.4cm,values of caffe/.style={pos=1.1}]% {2015}{7.2/A, 3.1/B, 0.6/C, 50.6/D, 26.5/E, 2.3/F, 7.5/G, 2.2/H}  \legend[shift={(0cm,-1.5cm)}]{{A}/A, {B}/B}  \legend[shift={(1.4cm,-1.5cm)}]{{C}/C, {D}/D}  \legend[shift={(2.8cm,-1.5cm)}]{{E}/E, {F}/F} \legend[shift={(4.2cm,-1.5cm)}]{{G}/G, {H}/H} \end{tikzpicture} \end{figure}  \end{document}   This looks quite the way I want it to, only the small numbers should be placed outside the pies.  Thanks in advance :)
71354
I have edited a script that creates some nodes, but the only problem is, it always created a new material. I want it to either add the nodes on the existing material, or a pre-defined material. Here is the script base I am using.    Thanks for the help in advance! :D
29699
I would like to wrap my properties inside collapsible panels when using the ExportHelper or ImportHelper class but I can not figure it out how to draw them properly:  This is my code so far (reduced version of the Operator File Export template): import bpy  # ExportHelper is a helper class, defines filename and # invoke() function which calls the file selector. from bpy_extras.io_utils import ExportHelper from bpy.props import StringProperty, BoolProperty, EnumProperty from bpy.types import Operator   class ExportSomeData(Operator, ExportHelper):     &quot;&quot;&quot;This appears in the tooltip of the operator and in the generated docs&quot;&quot;&quot;     bl_idname = &quot;export_test.some_data&quot;  # important since its how bpy.ops.import_test.some_data is constructed     bl_label = &quot;Export Some Data&quot;      # ExportHelper mixin class uses this     filename_ext = &quot;.txt&quot;      def execute(self, context):         return {'FINISHED'}   class SubPanel(bpy.types.Panel):     bl_label = 'SubPanel'     bl_idname = 'Sub_PT_Layout'     bl_parent_id = 'export_test.some_data'     bl_space_type = 'FILE_BROWSER'     bl_region_type = 'TOOL_PROPS'      def draw(self, context):         layout = self.layout         layout.label(text = 'test')          use_setting: BoolProperty(             name=&quot;Example Boolean&quot;,             description=&quot;Example Tooltip&quot;,             default=True,         )   def register():     bpy.utils.register_class(ExportSomeData)     bpy.utils.register_class(SubPanel)   def unregister():     bpy.utils.unregister_class(SubPanel)     bpy.utils.unregister_class(ExportSomeData)   if __name__ == &quot;__main__&quot;:     register()      # test call     bpy.ops.export_test.some_data('INVOKE_DEFAULT')  Unfortunately I get the following error:  RuntimeError: Error: Registering panel class: parent 'export_test.some_data' for 'Sub_PT_Layout' not found  Q: How can I add a panel to the properties area of the file browser when using the ExportHelper or ImportHelper class?
109340
I am slightly confused as to why the properties panel changes suddenly (as far as I know) when using shapes in Photoshop CC.  This is the normal properties panel when working with shapes    Then I sometimes get this    On the first image, I can see that I could toggle between the two views (masks and live shape). However On this second image I only see the mask tab. Is there a way to get the normal tab back. Or somehow prevent this from happening.   Thanks
76392
I'm writting an addon with an UI. In my draw function in my UI class I've this   layout.prop(bpy.context.scene, 'activebone', text='active bone')   Wich create an enum in the UI.    And in my register class I've this:  bpy.types.Scene.activebone = bpy.props.EnumProperty(items=active_bone)   In my draw fonction I fill the active_bone list with the some data and but the enum don't refresh himself. I know that i can retype  bpy.types.Scene.activebone = bpy.props.EnumProperty(items=active_bone)   But the draw function is Read only so I can't. Is it possible to refresh my Enum item in the draw function or am I obliged to do it in an other class like a button?
54585
I've been working on a pretty complicated component, and I've had all kinds of trouble simply trying to identify which element is currently being used. After all sorts of experiments, I found a really nifty property on event, the "path" attribute. It seems to be a list of all elements that the event has gone through, and actually includes the data I'm looking for. However, I don't see this in the documentation anywhere, so I want to know if this attribute is reliable.  Here's some demo code:  &lt;aura:application extends="force:slds"&gt;     &lt;aura:attribute name="items" type="Integer[]" default="[1,2,3]" /&gt;     &lt;aura:attribute name="currentIndex" type="Integer" /&gt;     &lt;aura:iteration items="{!v.items}" var="item" indexVar="index"&gt;         &lt;div data-value="{!index}" &gt;             &lt;lightning:input onfocus="{!c.focused}" name="demo" label="Text" /&gt;         &lt;/div&gt;     &lt;/aura:iteration&gt;     &lt;lightning:input disabled="true" readOnly="true" type="number"                      value="{!v.currentIndex}" label="Last Focused Item" /&gt; &lt;/aura:application&gt;     ({     focused: function(component, event, helper) {         var index = event.path.reduce(             (a,c) =&gt; c &amp;&amp; c.dataset &amp;&amp; c.dataset.value !== undefined?              c.dataset.value: a, null);         component.set("v.currentIndex", parseInt(index));     } })     Does anyone know where I can find the documentation for this, or otherwise figure out if this supported behavior? I'd rather not use a feature that will be patched out of existence later, and it would finally solve  about how to actually use a supported method that doesn't involve using a class, style, or name attribute, which should ideally be used for their intended purpose.
115975
i have this simple function in the Blender text editor : import bpy bpy.ops.object.select_pattern(pattern=&quot;Cube?&quot;) bpy.ops.object.select_pattern(pattern=&quot;Sphere?&quot;)  I just simply want to run this function using a shortcut. How can i bind a shortcut to it ? Thanks.
46202
I'm trying to amend an addon that I made for Blender 2.7X to work with Blender 2.80. The problem is with  bpy.context.scene.objects.active = some_object   This is how I used to set an active object, the problem is, active property was removed in the new API!,reading other Q&amp;As, I found 2 suggestions:  bpy.context.object   and  bpy.context.active_object    The problem is, both of these will return the already active object, but when I try to use them this way:  bpy.context.active_object = some_object   or   bpy.context.object = some_object   I'm getting an AttributeError: property is read-only!  I tried the documentation with no luck!  EDIT:  According to Blender 2.8 WIKI API changes:   bpy.context.scene.objects.active   changed into  bpy.context.render_layer.objects.active   This doesn't work, AttributeError: 'Context' object has no attribute 'render_layer'
40625
I'm a bit new to Blender, and in trying to learn more, I've stumbled across nodes.  What are nodes, and how do I use them?
108627
I am just starting to learn using Tikz and am a little lost within its seemingly infinite amount of options and possibilities.  What I am trying to do is visualize a few Matlab function interaction (which one calls which one, what is the in- and output). Since there are only about six subroutines, I place each one manually as a node. This is an example:  \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes,positioning}  \begin{document}  \begin{tikzpicture}[auto] \node           [rounded rectangle,draw]        (node1)     {Node 1}; \coordinate [above=of node1]                                (input); \node           [rounded rectangle,draw]    at  (-10:6cm) (node2)       {Node 2}; \draw           [-&gt;,very thick]             ([xshift=0.1cm]  input.south)  --                  node {right}                ([xshift=0.1cm]  node1.north); \draw           [-&gt;,very thick]             ([xshift=-0.1cm] node1.north) --                  node {left}                 ([xshift=-0.1cm] input.south); \draw                                            (node1) -- (node2);  \end{tikzpicture}  \end{document}     Now I would like to apply these double in/out arrows I (probably pretty awkwardly) created using xshift to all node connections, so in this example also for the connection between Node 1 and Node 2. Ideally, the space between these two arrows would be the same, independant of their angle and they would nicely connect to the outer line of the nodes. Any idea how I could achieve this? Similar questions I have found only used rectangle and orthogonal lines.
4857
I'm facing this frustrating "feature" that I can't seem to remedy; when I duplicate an object (and now, even when I create two completely new objects), their transformations/scaling is synchronized. This is extremely annoying when trying to use any sort of transformation keyboard shortcut.  It should be noted by going to the properties menu (N) and manually setting the properties works just fine.  For instance, here is just the camera selected (trust me, I made sure):   And when I try to transform by clicking+dragging on the X axis OR by hitting G->X, this happens:   They are not grouped (verified by going to the Groups list up in the Scene panel) and they do not have parents (verified by going to Object->Relations).  I have tried the unlink command as well, to no avail.  I have seriously run out of options; what did I change to have my G->X shortcuts transform multiple objects? It seems completely at random, too; certain objects seemed to be "linked" to other random objects, and this "linking" is guaranteed when duplicating even when I do a non-linking duplicate (Shift+D).  What gives?
96568
mentions that it's possible to rotate and scale a selection while in Edge Select mode in the Properties panel. However, I can only find the option to transform the selection's median. There is no rotation or scale option in the panel.    How can I rotate and scale by entering a value in the panel in Edit Mode?
42703
I'm very new to Blender and am having a bit of trouble. After I Shift + A > Mesh > Cylinder, I want to pull up this menu:    How would I do this, please? It doesn't just pop up after I add in the cylinder. Thanks.
43534
I'd like to know how exactly to use the new bevel node in Blender 2.79b. It's in the manual now, but I've not yet been able to even locate it. How exactly do you use it?
59917
I'm still learning, but I'm trying to follow a tutorial to apply texture to a model. I only want to apply the texture to one object in the scene, so I selected it, unwrapped it, and painted over it. Now I selected it in the Edit Mode (I can't select it in the Object mode because all is locked together) and went into Node Editor, but the nodes are greyed out.  Why?