text:
Shrinkwrap addon conflicting with curve bevel
I have made a grid curve which I beveled for a final result which looks like this:

I am making an animation out of this, which will make the grid object wave like a flag. To do so, I have shrinkwrapped the grid object to a moving wavy plane, so that the result looks like this:

Now, the problem is that not only did the curve get shrinkwrapped onto the plane, but also the bevel. Which makes the whole thing flat, as can be seen in the GIF. How can I fix this?
One solution I can think of would be to "bake" the waving animation onto the curve so that I don't need the shrinkwrap addon anymore, thus letting me bevel the curve independently. Unfortunately, I do not know how I can do this.
Thanks for reading!

I think you may be over complicating
Shrinkwrap modifier is used to project one flat surface over the another, not really very fit for complex animation, nor projecting non-sheet-like objects with volume.
Also curve objects are not really very fit for deformations (a least not in the Z axis), they will inevitably lead to artifacts due to their triangulated nature, lack of proper subdivisions, and non quad based topology.
You should use a base mesh object instead, which also widens the choice of modifiers available, and possibly use a Wave modifier instead, unless you need a very specific or precise wave shape.
Only then on top of the Wave deformation modifier (or whichever other you choose) apply a Solidify to add thickness and a Bevel to chamfer or fillet the corners.
That way you will guarantee that the thickness and bevels are not distorted as much by the Wave, nor squashed by the Shrinkwrap.
You may optionally add a Subdivision modifier set to Simple on top of the stack, so you get a smoother mesh with less bevel distortions

I've looked into the wave modifier, and it doesn't seem to be able to make perfectly round waves the way I need them to be. I have since found different solutions that might work, though. Thanks for the help anyway!

authors: Máhmøđ Môĥâmēð


text:
UV unwrap doesn't show up in Object Mode?
I know that this is a usual question and might already have an answer online, but I am stuck at UV unwrapping for a lot of time already and i want to explain my issue in detail.
I want to add textures from an image onto a few cubic meshes i have, mostly the front face. I unwrapped the cube in blender and added a image to and it looks good in the texture window, but as soon as i enter object mode or rendered the image is no more and the cube is showing the material only and not the image. I have already assigned the image texture with UV coordinates to the cube still it doesn't show up on object mode. Please help me..

Are you using BI or cycles? Is it possible you could upload your .blend?

Hey i can get the image in my object mode now, but when i switch to solid view it disappears again.
texture view -http://postimg.org/image/72mubr5yd/
Solid view -http://postimg.org/image/pwd8mhtk5/

Solid view doesn't display textures by default, use textured view, material view, rendered view, or enable Textured solid in 3D view > Properties region (N) > Shading.

Hey, thank you so much. I can now atleast see it in solid view, but how can i ensure it will show up if i import it into unity 3d.

If you got it this far, it should be exported okay. The rest is on unity's end, see http://blender.stackexchange.com/q/306/599.

In order to make a UV Mapped image appear in Object Mode, I found it was necessary to both:

Set the Viewport Shading mode (The button just to the right of the Edit/Object mode selector in 3D View) to "Texture Mode"
Set Properties -> Shading (game_settings.material_mode) to GLSL (OpenGL Shading Language)

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
How do I export an object from blender and import in Maya?
I need a way to export a specific model from my Blender scene (for example a textured table) and import it in an already created scene in Maya.
Example case to be more specific:
I created a classroom in Maya and a bedroom in Blender. I want to export the desk I created in Blender and import it as a desk in Maya. How can that be achieved?

Check out this link, see if it helps any: https://www.youtube.com/watch?v=X-izMDwkg7c

The easiest way would be to select the object (desk) you want to export in Blender and export it as .obj file one of these ways:

click File -> Export -> Wavefront (.obj) OR
press space and type "export" -> click Export Scene: Export OBJ

Make sure to check Selection Only in the Export OBJ section, otherwise you would export the whole scene.
In Maya simply click

File -> Import...

and select the exported file.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Blender Character looks abnormally smooth
I'm assuming its the lighting but if not will that mean I'll have to retexture my entire character?

Define 'Abnormally smooth'. How is your render different from what you were expecting?

If you notice, the character's hood has a different shading from the rest of her body.

The hood may have had smooth shading applied to it.  To remove this, I have two solutions:

If the character is one object, then select it. On the tools tab of the Tool Shelf there is an option under Shading called flat. Select that and the whole mesh should have flat shading.
If the character is multiple objects, then select the hood. Then repeat the step above to apply flat shading.

Hope this helps!

That helped alot thanks man! ||One more issue to solve unfortunately, the character is transparent for some reason,is there a setting of some sort I can edit this?||

Transparent in the render?

yep ____________________

If you look real closely at the image you'll see her hair pops out from the rest of the image

Is it a separate mesh?

Joined, but I didnt find out that the sun was emitting too much bright lighting on the character as well,is there a way to change it's intensity?

Can you link a .blend file?


text:
Bones are invisible in blender
When I move the camera around in Blender the bones instantly go invisible however when I press 1 they're visible.

I dont know if this is a bug or what

Since you are in ortho view the armature could be very far away from your object/center. With armature in outliner selected press Shift-S -> Cursor to Center, Shift-S -> Selection to Cursor.

Good call, from looking at the info dialogue that's displayed in the screen capture we can see that this is what's happening.  The 'y' position for the armature is 472 units.

@user2859 Could you add your comment as an answer.

@stacker, done.

@Joe if the answer was helpful, please consider to mark it as accepted.

Seeing an object in axis aligned view,
but not in user-defined view usually means it's far away from the current POV (point of view) or
outside of the current frustum. Orthographic view provides no sense of depth. Objects appear the same
size no matter how far or how close they are.

New objects are placed at the postion of the 3D Cursor.

The 3D Cursor is placed with LMB. A click in empty space will position it in a plane,
that is parallel to the view plane at the distance of its old position.

A click on a visible object will project the 3D cursor on the object.

The current cursor position and the position of the selected object are shown (and can be changed)
in the Properties Panel of the 3D View.

You can also use the Snap menu by pressing
ShiftS.

E.g. with the object selected press ShiftS - Cursor to Center, ShiftS - Selection to Cursor to set the objects position back to the center.

It's layers. If you press 1, it's going to put you on the first layer. There are 10 layers, and 10 alternative layers. To access the layers, you can press 1, 2, 3, 4, 5, 6, 7, 8, 9, or 0.
To access the alternative layers, you do the same thing but holding Alt. You can select multiple layers by holding down Shift and pressing those numbers.
And for assign an object to a layer, you have to select the object and then hit M. You can select which layer you want it on from there. The layers on the top are the regular layers, and the layers on the bottom are the alternative layers.

authors: ธามนิธิ วิจิตธรรมภาณี


text:
code under modal operator gets executed only when mouse is moved or a key is pressed
i have the following code to receive serial data from arduino and rotate the cube...
import bpy
from bpy import context
import serial
from time import sleep
from bpy.props import IntProperty, FloatProperty

value = 0
i=0
j=0
degree = 0
ser = serial.Serial("COM77", 9600)

class ModalOperator(bpy.types.Operator):
  bl_idname = "object.modal_operator"
  bl_label = "Simple Modal Operator"

x = IntProperty()

def modal(self, context, event):
   if ser.inWaiting()>0 :
        value = ser.read(2)
        print(value)
        self.x = int(value)
        print(self.x)
        self.x += 1000
        degree = self.x * 3.14/180
        print(degree)
        bpy.context.object.rotation_euler[0] = degree

   if event.type  == 'LEFTMOUSE':
       return {'FINISHED'}
       ser.close()

   return {'RUNNING_MODAL'}

def invoke(self, context, event):
    if context.object:

        print("hi")

        context.window_manager.modal_handler_add(self)
        return {'RUNNING_MODAL'}
    else:
        self.report({'WARNING'}, "No active object, could not finish")
        return {'CANCELLED'}

def register():
   bpy.utils.register_class(ModalOperator)

def unregister():
   bpy.utils.unregister_class(ModalOperator)

   register()

# test call

bpy.ops.object.modal_operator('INVOKE_DEFAULT')

the code under invoke function executes immediately when i run the script..but the statements under modal function executes only if i move the mouse or press any key...
I think it doesn't consider incoming serial data as an event...
i want the serial data to be read as and wen it comes...not only wen the mouse is moved..
Is there any way to check serial event....  like  'MOUSE_MOVE'  or 'LEFTMOUSE'....

What you are looking for probably, is running a timer alongside the modal operator, so you can check the serial data whenever the operator gets executed with a timer event.
There already is a code template in blender, that shows you how to do this.
Look for the Template menu entry at the bottom of the Text Editor and select Python > Operator Modal Timer
The relevant code is in the execute function:
wm = context.window_manager
self._timer = wm.event_timer_add(0.1, context.window)

The 0.1 controls the time interval between successive timer events in seconds.
Then you can check for a timer event in modal with:
if event.type == 'TIMER':

And for cleanup in the cancel function:
wm = context.window_manager
wm.event_timer_remove(self._timer)


text:
How to bake an animation for a deformed mesh?
I have made a mesh which is being shrinkwrapped onto a moving plane, which gives the effect of the mesh waving and moving. Problem is, I don't want the mesh to be dependent of the shrinkwrap modifier. How can I "bake" the animation so that the mesh can move on its own?

Why not? Is it because you don't want the shrinkwrap's target to be visible during render? It may be simpler to do something else than removing the modifier.

Well, the thing is that I want to give my mesh thickness, more specifically give it a round bevel (since it's a curve). But if I do this, the bevel will be flattened as well as the curve. Maybe another way to ask this question is: How can I have a curve with a bevel that is no affected by the shrinkwrap modifier?

Could you post a screenshot of your Modifier setup?


text:
How to rig a chest lid
I have never made any rigs or used bones before, but I need to do an extremely simple task. I have modeled a chest, and I simply want to rig it so that I can open and close it with a click and drag of the mouse. Here's the chest:

And I want it to open like this (in this case I'm using R+Y with 3D cursor at pivot point)

One possibility:

Add a bone that begins in the rotation axis. Any other object will do as well because I don't use a rig but simply a parent/child.

Parent the bone to the top of the chest and the bottom of the chest to the bone.

Lock the location of the bone and two of the rotation axes (depends on how your bone is rotated).

Now you can select the bone and press R to open and close the chest independent of the chests position or rotation.

Note that you don't even need a third object for that (bone). If the top's origin is on the rotation axis then you can parent directly and lock position as well as two rotation axes.

Please accept the answer if it solved your problem. It will help others find the solution to their own problems and give proper credit to the one that answered it.


text:
How to disable anti-aliasing in the background images
This is pretty straightforward: I'm using pixel art as background image and I don't want it to anti-alias like it is right now:

If your original image is not a vector format but a jpg or a tiff , I am afraid it's the quality and the way the image is that affects the outcome. You may have to create a higher resolution version by tracing the jpg on a photo editing or illustration software.

You need to change your interpolation type to Closest:

This also works with Materials Too.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
How to trace light rays
This has nothing to do with rendering. I am designing a solar oven and would like to see how the "sunlight", meaning rays falling straight down into the oven, bounces off the parabolic walls of the solar oven and into the oven itself. What I'm imagining something that would look like this:

Pictured is the solar oven (the actual "hotbox" being the bottom part, while the top is the parabola that will concentrate the sunlight)
Is there perhaps an addon that makes this possible?

Do you need to animate this or a static image only? Animation Nodes or Sverchock addons might be able to do this easily, though i don't have any experience with them. Not sure how to do it natively though, maybe particles with physics.

Light travels in straight lines. The angle of reflectance equals the angle of incidence.

I don't think you need any simulation or other visualization than this:

Every straight ray has to go through the focal point, which for a parabola is a single point. You can construct this point for any parabolic solar oven like this [pdf link].
Every ray coming through this focal point will also leave straight up after hitting the opposite side (if the parabola is big enough). The food (or anything else) is supposed to be placed directly at the place of the focal point.
The design with the bottom parabola part under the focal point replaced with (usually) black box is not very efficient if you are trying to heat directly from rays. Usually such design is meant to heat up the whole box, and the food off of this box.
For direct ray focusing a double parabola design with shared focal point will focus the rays much more efficiently:

The pattern of the rays coming through is of doughnut shape, so it is best to place the food in a small circle. You are also able to further focus these rays into a single point with some lens.
If you really need to plot lot of rays, I suggest using CAD software for this (like freeCAD, etc..), where you are able to easily create geometric entities and constrain them to each other.
You can do the same inside Blender with* Constraints* on bones or empties, but it is much more work to setup. The geometry math is very easy though.
You can also preview the caustic pattern of any curved mirrors, but Cycles is not very efficient for this task. Any bi-directional path-tracing renderer is a better choice.
To make cardboard parabolas with Blender you need the Export: Paper Model plugin. You can create parabola meshes with the bundled Add Extra Objects plugin. There are multiple ways to make parabolas, but I like this one:

it is an icosphere mesh Shrink Wrapped to parabolic mesh
it can be disassembled into 5 stackable pieces for easy storage
I marked 1 possibility of gluing flaps placement on one of the pieces, but the Paper Model plugin can figure this out itself. If the cardboard is thick enough, I believe there is no need for flaps, just cuts to be glued together.
it can be sprayed with reflective paint (Mirror Spray Paint cca $5), imho much better choice than gluing aluminium to paper

A popular idea is also to use an umbrella..

Yes, I am aware of the parabola focal point. In fact I designed the oven after I plotted the parabola in another program. My oven is square in shape, not circular like a satellite dish. The reason I asked the question was because I was wondering what path the light rays at the corners would take. I appreciate the advice, though! My oven is designed at a very hobby-level, as I plan to build it myself with cardboard and tin foil. It was also intended to be a solar oven (with the black box) rather than a solar cooker, as I do want to heat the whole box evenly.

I believe the square shape also eliminates the possibility of a double-parabola solution.

@EspenSales It will be hard to focus the light into the box evenly - I believe most will hit the top of the sides of the box. If the parabola is of square cross section, the focused pattern will be a cross-like shape (at focal point, then blurred). You can render the caustics how they will turn out in Cycles, but it won't give you the rays themselves. In CAD you could do the rays on 3D surfaces.


text:
How to flatten a surface
I'm designing a piece which I will cut out of cardboard in real life. Since the surfaces are curved, I need to flatten them out without changing the dimensions to be able to measure them correctly in the flat cardboard. Here is the surface I want to flatten:

As you can see, it's slightly curved. I'm almost certain someone has asked the same question, but I can't find the answer.

This may help https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Import-Export/Paper_Model

The download button shows me to a wall of text... how do I download that?

Possible duplicate of How do I flatten a selection of a terrain map?

@EspenSales Right Click >  Save Link as or open wall of text and save the page as a python file with .pyextension


text:
Is it possible to make a boundary box for an object while sculpting?
I am modelling a statue which will sit on a stand. While I'm modeling, I would like to make it so that I can't sculpt past the surface of this stand:

I have manipulated the mesh in edit mode so that it's flat against the stand. But the moment I want to sculpt the bottom part further, I risk making the statue go past this stand. Is it possible to make the stand an obstacle/boundary?

or you could model as usual and later make the bottom flat with scale along z-axis with respect to 3d cursor?

yep, that's what I do now. I was just wondering if there is another way.

Aside from correcting in Edit mode, you can lock sculpting by global axes, in this case lock Z axis. Note that lock affect sculpting everywhere so it might be useful only in related area.


text:
How to make a 5-point perspective camera view?
Look at this painting, The Courtyard by Irvine Peacock:

As you can see, there is a sort of fish-eye effect here so that the lines curve, so that you can see more of the image. How can I recreate this effect?

I havent tried it with the blender camera but in real life you would use an extremely short focal length lens IE 12mm or 9mm. You maybe able to fake it using a Lattice.

In the camera settings switch from Perspective to Panoramic. It will work only on render.

You may achieve it using Fisheye Equisolid type of the Panoramic camera (with some manual vertices tweaking).

Add a camera and position it verticaly as pictured below. Add a plane and place it in front of it. Add a background image (display axis type: Camera), decrease its opacity and push the Front button.

Set the render resolution so it is the same as image's resolution.

Enter the camera view (Ctrl+Num 0) and rotate it along the Z axis to fit the plane to the reference. Extrude the plane until you you build the rough representation of the object from the picture.

Select the extruded object in Object Mode and give it a material (Emission e.g.). Also give it a Wireframe Modifier with some thickness.

In Cycles go to Camera Data header--> Lens panel and set the camera type to Panoramic (Fisheye Equisolid). Experiment with Lens and Field of View values. In this case I found Lens=14 and FoV=180 optimal.

Divide the 3d view into two windows. Set the Solid viewport shading mode for the first and Rendered for the second one.

Snap the cursor to the origin point of the plane. Grab the camera and translate it along the Z axis. Next rotate it along the local Y axis (press R, then double tap Y) to fit the image as precisely as you can.

Controling two views at the same time you can now easily make the subdivisions to the mesh and model the details.

To make the model exactly fit the reference's perspective you may tweak some vertices.

Here's the comparision between original and tweaked perspectives.


text:
How to capture leftmouse up event by python?
After seeing bpy.types.Event https://docs.blender.org/api/current/bpy.types.Event.html, and some code examples, I cannot find the event of leftmouse up, only LEFTMOUSE is available. (correct me if it is wrong)
I want to ask how to capture the leftmouse up event using python. Thanks.

As mentioned in the document, the Event.type will tell you which key or mouse button sent the event and the Event.value specifies if pressing or releasing happened.
So you can do something like below in the modal method of an operator for example:
Here ctx is the current context in Blender and the evt is bpy.types.Event instance
def modal(self, ctx, evt):
    if evt.type == 'LEFTMOUSE':
        if evt.value == 'PRESS':
            print('LMB Pressed')
        elif evt.value == 'RELEASE':
            print('LMB Released')
    return {'RUNNING_MODAL'}

A thorough example of using modal event handler is at the link below.
https://developer.blender.org/diffusion/B/browse/master/release/scripts/templates_py/operator_modal.py


text:
How to End object in BGE after multiple collisions
I am a student from Malaysia studying animation. This is my final year and I decided to make a 3D game using blender. In my game, I want the object in the BGE to end after taking two or more hits. Because it's too easy to make it die after taking one hit, is there any way to solve this ?

Please you add more information of what you did already and a screenshot, so people can help you.

The question title should be much more specific. Such generic questions are not helpful. Please rephrase the question

I am a Malaysian too.Where did you study?

Make a new Game Property called lives. Use a collision sensor set to tap, and make a new Property actuator, set mode to add, property to lives, and value to -1. Then add a Property sensor, set property to lives, and value to 0. Connect it to an Edit_Object, end_Object actuator. Set lives to however many lives you want. Hopes this helps


text:
What is the difference between bpy.types.IntProperty and bpy.props.IntProperty?
I am always confused between bpy.types.IntProperty and bpy.props.IntProperty. (similarly with other properties)
Most of the examples do use bpy.props.IntProperty, but I never came across a clear explanation of the difference between them.

*Property functions in bpy.props module are what we use to instantiate the property. Classes with the same name in bpy.types contains structure related to the property, accessible at runtime.
For example, in the snippet below I use bpy.props.IntProperty function to add a custom property to a scene object. Even though scene.int_prop is a Python integer, I can still access the property's structure as scene.rna_type.properties['int_prop'], and the type will be bpy.types.IntProperty:
import bpy

bpy.types.Scene.int_prop = bpy.props.IntProperty(default=9)

# > 9
print(bpy.context.scene.int_prop)

# > <class 'int'>
print(type(bpy.context.scene.int_prop))

# > <class 'bpy.types.IntProperty'>
print(type(bpy.context.scene.rna_type.properties['int_prop']))

del bpy.types.Scene.int_prop


text:
Is it possible to add a custom property on bpy.types.Sequence?
I am in the process of writing a tool that makes uses of Sequences in the Sequence Editor. I was trying the following in my add-on (register() method)
Sequence.active = BoolProperty(name='Active',
                               description='Is the custom property group active',
                               default=True)`

After I launch Blender and try to assign a value to my custom property, I get the following error
>>> C.scene.sequence_editor.sequences[0].active = 1
Traceback (most recent call last):
File "<blender_console>", line 1, in <module>
AttributeError: 'SceneSequence' object attribute 'active' is read-only

So my question is: Is it possible in anyway to add a custom property to a Sequence?

Update: bpy.types.SequenceProperties  is supported in 2.75 (or recent builds)
The information below is kept since the answer still applies to types such as bpy.types.TimelineMarker or bpy.types.Modifier.

In short - no. You can only add custom data properties on:

ID (its subclasses Action, Armature, Brush, Camera, Curve, FreestyleLineStyle, GreasePencil, Group, Image, Key, Lamp, Lattice, Library, Mask, Material, Mesh, MetaBall, MovieClip, NodeTree, Object, PaintCurve, Palette, ParticleSettings, Scene, Screen, Sound, Speaker, Text, Texture, VectorFont, WindowManager, World', etc...)Try run: bpy.types.ID.__subclasses__() to see all.
Bones
PoseBones
AddonPrefs
Node, NodeSocket, NodeSocketInterface
OperatorProperties.

The reason this gives confusing output is that the initial assignment is using Pythons regular class assignment, in this case its not using a metaclass (which would interpret the property definitions and apply them as you are expecting).
bpy.types.Sequence.foobar = 22
print(bpy.context.sequences[0].foobar)
# >>> 22
bpy.context.sequences[0].foobar = 11 # <-- will error!
# AttributeError: 'SceneSequence' object attribute 'foobar' is read-only

So why use this at all?
- Because it allows you to add utility methods & properties at run-time. Note that this is standard python and nothing Blender specific (unlike custom properties).
bpy.types.Sequence.calc_frame_mid = (lambda seq:
        (seq.frame_final_start + seq.frame_final_end) / 2)

print(bpy.context.sequences[0].calc_frame_mid())

... you can add Python style properties too.
Note, adding methods and properties to existing data types is known as Monkey Patching and often considered bad practice, however you can also use this to dynamically build up functionality into classes you generate for instance, so it can be used in some interesting/useful ways too.
If you modify Blenders built in types it will make the changes globally so beware it could break other scripts or even make Blender fail to use its own API's correctly, so this is really advanced api usage.

+1 Thank you for the response and some insights into properties. I will look into this and see if i can implement a workable solution for my addon.

Thank you again for the extra note. Will keep that in mind and test accordingly.

Update, in 275 you can do this!


text:
How do I copy a property from an active object to selected objects?
I have been using the Copy Attributes add-on to copy some properties from active object to selected objects. This add-on is not enabled by default and must be explicitly enabled. But its a very useful workflow enhancing tool.

There is a limitation though. Not all properties can be copied and even those that can be copied are copied in groups (Its hard-coded in to the add-on).
My question is if there is a built-in feature or any another other way to copy any property from the active object to the selected objects?

It appears there are few other options for copying properties.
Built-In Features

Choose the objects to which a property has to be copied (destination)
Then choose the object from which to copy the property (source)
In the Properties panel,  RMB on the property and select Copy To Selected.
You can also Press and Hold ALT key and then change the property on active object so that the selected objects also get updated.

In the screenshot, the show_name property on an Cube object is about to be copied to the Lamp and Camera objects.

Some properties can also be copied using the Object > Make Links menu available via Ctrl + L:

Add-On: System Property Chart
There is an add-on called System Property Chart, which is bundled with Blender but is not enabled by default. After enabling, you can use it like so:

The Property Chart panel is located in the properties panel of the 3D View Editor.
By default, some properties already exist for viewing and editing. You can save presets by clicking the + icon.
If you want more properties you can find the property in the interface and the right click on it and choose Copy Data Path and then paste it in the text area below the presets menu.
The first row displayed is the active object and the rest the selected objects.
By clicking the clipboard icon next to the column text, properties from active object is copied to selected objects.

Note: This panel displays properties of selected objects only. If there is no selection in the viewport, the spreadsheet is not displayed.

Very helpful. Is there a reason why Ctrl+L is not part of right click option "Copy to Selected"? It's too many options for same thing.

The Property Chart add-on covers edge-cases which are lacking from the Right Click > Copy to selected and the CTRL + L "Make Links" menu pretty well (eg. copying dimensions or object name) but I find it is a bit limited :

One has to know the python attribute name in order to type it in the Properties field.
The horizontal + vertical expansion of the panel makes it not well suited for the current use of the N Panel in the 3D viewport editor. It would be awesome as an addition in the new spreadsheet editor though !

This script will add an operator which will list all the properties one can copy from active object to all selected objects. It can be installed as an add-on if put inside a python (.py) file.
import bpy

from bpy.types import(
    Operator,
)

from bpy.props import(
    EnumProperty,
)

bl_info = {
    "name": "Copy ANY Property",
    "blender": (2, 80, 0),
    "category": "Object",
}

def copy_custom_prop(source, target, prop):
    "Copies custom prop from source to target"
    # Make sure the custom props dictionary is initialized (Mainly for empty objects) :
    rna_ui_id = '_RNA_UI'
    if rna_ui_id not in target.keys():
        target[rna_ui_id] = {}

    # Copy custom prop :
    target[prop] = source[prop]
    # Copy the subtype, min, max etc :
    try:
        target[rna_ui_id][prop] = source[rna_ui_id][prop].to_dict()
    except KeyError:
        # Custom prop is API defined. Don't mess with it.
        pass
    # "overridable" is a "special" attribute :
    target.property_overridable_library_set(
        f'["{prop}"]', source.is_property_overridable_library(f'["{prop}"]'))

def retrieve_props(self, context):
    """Retrieves all non read-only properties formatted to populate an EnumProperty"""
    retrieve_props.no_copy = "__DO_NOT_COPY_ANY_PROP"
    items = []
    ao = context.active_object

    [items.append((p.identifier, p.name, p.description))
        for p in ao.bl_rna.properties
        if not p.is_readonly]
    if '_RNA_UI' in ao.keys():
        [items.append((p, p, p))
            for p in ao.keys()
            if not p.startswith('_')  # Make sure it's not "private"
            if p in ao['_RNA_UI'].keys()  # Make sure it's not API defined
         ]
    items.sort(key=lambda e: e[1])
    items.insert(0, (retrieve_props.no_copy, "NONE", "Do not copy any property"))
    return items

class GU_OT_property_copy(Operator):
    """Copy Property"""
    bl_idname = "property.copy"
    bl_label = "Copy Any Property from active to selected"
    bl_settings = {'INTERNAL'}
    bl_options = {'UNDO', 'REGISTER'}

    prop_copy: EnumProperty(
        name="Copy Property",
        description="Choose which property to copy from active to selected.\n Silently passes if target object doesn't have property",
        items=retrieve_props,)

    @ classmethod
    def poll(cls, context):
        return context.active_object is not None and len(context.selected_objects) > 0

    def invoke(self, context, event):
        # Reset prop to prevent random mishaps :
        self.prop_copy = retrieve_props.no_copy
        return context.window_manager.invoke_props_dialog(self)

    def execute(self, context):
        if self.prop_copy == retrieve_props.no_copy:
            return {"FINISHED"}
        ao = context.active_object
        if self.prop_copy in ao.keys():
            for obj in context.selected_objects:
                if ao == obj:
                    continue
                copy_custom_prop(ao, obj, self.prop_copy)
        else:
            value = getattr(ao, self.prop_copy, None)
            for obj in context.selected_objects:
                if ao == obj:
                    continue
                try:
                    setattr(obj, self.prop_copy, value)
                except TypeError as e:
                    # Edge case : Only empties can have an instance_type of 'COLLECTION'
                    print(f"Could not copy property from {ao.name} to {obj.name}\n{e}")
                except AttributeError as e:
                    # For some reason some properties are readonly despite is_readonly being False
                    print(f"Could not copy property from {ao.name} to {obj.name}\n{e}")

        return {"FINISHED"}

def draw_props_links(self, context):
    self.layout.operator(GU_OT_property_copy.bl_idname, text="Copy ANY Property")

def register():
    bpy.utils.register_class(GU_OT_property_copy)
    bpy.types.VIEW3D_MT_make_links.append(draw_props_links)

def unregister():
    bpy.types.VIEW3D_MT_make_links.remove(draw_props_links)
    bpy.utils.unregister_class(GU_OT_property_copy)

if __name__ == "__main__":
    register()

It adds the operator to the CTRL + L "Make Links" menu :

Nice one. Would make a small change and calc value = getattr(context.active_object, self.prop_copy, None)  first, then if it is None and in keys it's a custom prop, (consider copying over _RNA_UI details)  and not currently defined via bpy.types.Foo.bar = bpy.props...  and unset. This will (theoretically) allow for update, set, get methods on property to be thrown.

@batFINGER thanks for the feedback ! I'll take a look :)

@batFINGER I've made some changes, hopefully it covers most edge cases ! I have not tested what happens with eg CollectionProperty copying but I think? it shouldn't break things. I am a bit stumped though by use_mesh_mirror_z and y which are not readonly according to is_readonly but throws an exception when copied... Curisouly it doesn't complain on X axis and it doesn't throw exception on mesh object > mesh object but it does on mesh object > other type

Not sure where use_mesh_mirror is.

Wondered, using a pre-historic version. 2.91 mostly atm. Any way related to   self.data.use_mirror_x  if self is a mesh object?

@batFINGER OK Found it, it's only in available in edit mode. https://i.sstatic.net/CV0vt.png Makes sense it's only available to Mesh object. Although I would very much see it usable on lattice and curve objects ? I wonder if an object can know if a property is right for its type or not, besides using a try/except


text:
How display and execute in the right context UI elements of operator in a panel?
In reference to my other question, i try to display my properties operator directly in the UI Panel, but when i "click" on the created buttons and field, nothing happens.
For my tow parameters "axis" and "newdim" :
The action takes place here: bpy.context.object.axis = y
The action takes place here: bpy.context.object.newdim = 2.5
where i need it takes place like this:
bpy.data.window_managers["WinMan"].(null) = 2.5
bpy.data.window_managers["WinMan"].(null) = 'y'
bpy.ops.object.resize_proportional(axis='y', newdim=2.5)

So, change value have no effect.
How can i have this panel presentation in UI (like the script bellow), with direcly choice between X, Y and Z, and directly de width value adjustable, and above all this to take effect ?
from bpy import *
import bpy
from bpy.props import FloatProperty, EnumProperty

#————————————————————————————————————————————————————————————————————————————————#
    # The Resize Operator
#————————————————————————————————————————————————————————————————————————————————#
class ResizeProportional(bpy.types.Operator):
    bl_idname = "object.resize_proportional"
    bl_label = "Choose_the_Right_Axis"
    bl_description = "This is to choose the axis"
    bl_options = {'REGISTER', 'UNDO'}

    axis = EnumProperty(
            name="Axis",
            description="Axis selection",
            items= [('x', "X", ""),('y', "Y", ""),('z', "Z","")],
            default='x'
            )

    newdim = FloatProperty(
            name="Width",
            description="Scale",
            min=0.01, max=100.0,
            default=1,
            )

    # The Resize function
    #———————————————————————————————————#
    def scale(self, axis, new_dim):
        ob = bpy.context.active_object
        d = ob.dimensions

        x = d[0]
        y = d[1]
        z = d[2]

        scale =  axis

        if( scale == "x"):
            indice = 0
        elif( scale == "y"):
            indice = 1
        else:
            indice = 2

        old_dim = d[indice]
        factor = new_dim / old_dim

        scale_x = ob.scale[0]
        scale_y = ob.scale[1]
        scale_z = ob.scale[2]

        ob.scale[0] = scale_x * factor
        ob.scale[1] = scale_y * factor
        ob.scale[2] = scale_z * factor

#    def invoke(self, context, event):
#        wm = context.window_manager
#        return wm.invoke_props_dialog(self)

    def execute(self, context):
        self.scale(self.axis,self.newdim)
        return {'FINISHED'}

#————————————————————————————————————————————————————————————————————————————————#
    # The Proportional Dimensions Panel
#————————————————————————————————————————————————————————————————————————————————#
class ProportionalDimensions(bpy.types.Panel):
    """Creates a Panel in the Object UI window"""
    bl_label = "Proportional Dimensions"
    bl_idname = "prop_dim"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    #bl_context = "object"

    def draw(self, context):
        layout = self.layout
        obj = context.object

        layout.prop(obj, "my_global_axis", expand=True)
        layout.prop(obj, "my_global_newdim")

        #props = layout.operator(ResizeProportional.bl_idname)
        #props.axis = obj.my_global_axis

        #layout = self.layout
        #layout.operator(ResizeProportional.bl_idname, text ="Resize active object: "+ obj.name)

#————————————————————————————————————————————————————————————————————————————————#

def register():
    bpy.utils.register_class(ProportionalDimensions)
    bpy.utils.register_class(ResizeProportional)

    bpy.utils.register_module(__name__)

    bpy.types.Object.my_global_axis = EnumProperty(
        name="Axis",
        description="Axis selection",
        items= [('x', "X", ""),('y', "Y", ""),('z', "Z","")],
        default='x'
    )

    bpy.types.Object.my_global_newdim = FloatProperty(
        name="Width",
        description="Scale",
        min=0.01, max=100.0,
        default=1,
    )

def unregister():
    bpy.utils.unregister_class(ProportionalDimensions)
    bpy.utils.unregister_class(ResizeProportional)

    bpy.utils.unregister_module(__name__)

    del bpy.types.Object.axis
    del bpy.types.Object.newdim

if __name__ == "__main__":
    register()

Is this question primarily about how to resize proportionally? I don't see a reason why you would want to implement that, there are already multiple built-in ways to do that - S to scale (with optional keyboard input) and multi-number editing. To do something alike with Python, I would probably use a property with callback, but it's a bit tricky to not create infinite loops.

There is no tools, and no ways to do this. Exemple : you make a bottle to a exact size like 1 unit = 1 cm (for exemple). You bottle messure x: 6,8 cm, and y: 3,2 cm. Your client want to change this after to x: 4,36 (again for exemple), but you must keep exactly the proportions of the bottle created. So, how could you do that ? you can't, in blender you juste can't. the scale is approximative and you can't specify an exact measure. With this tool, you can.

4.36cm / 6.8cm = ~0.6412, select the bottle, hit S and type 0.6412 to rescale to exact dimensions while keeping proportions. If you want to make this a tool that automatically uses e.g. the bounding box dimensions of either of the 3 axes, I would use a props dialog. Also see http://blender.stackexchange.com/questions/4890/how-to-set-a-specific-edge-length-numerically (but note that proportions are not kept if you edit a single scale property).

There is a simple workflow to resize an object, without the need to code any new tools.
Going from your comments I will be resizing a bottle. First open the Properties panel with N.
In object mode simply type the new dimension for any of the three axes in to the proper Dimensions field in the properties panel.
The Next step is to copy the new scale value to the other two axes. Simply hover over the changed scale field and press CtrlC, then hover over the two unscaled axis and press CtrlV.
Last (if you want the object's scale set to one) apply the new scale with A > *Scale*, or in the 3D view header *Object > Apply > Scale*.
You now have a resized object with the exact same portions as the original.


text:
Large Braids with Hair Particles
How could I take out the space in-between the hair strands on a large braid?

I would like to remove those "holes" and make hair children better distributed. I tried reducing the amplitude, but it gets too skinny. As you can see on the settings it's 1 parent with 10k children particles.

I'm pretty sure I can make adding a custom property, but I don't know which one to choose.

Well, I had play with the Children settings till actually got some reasonable result:

Here is my recipe for a nicer looking braid:

As you can see, mainly Random and Size properties made the strands get thicker, but it can also mess around with the shape at the end. So I suggest trim it with Length.
Use a high value for Clump on Effects Section and a low Clump on Kink Section.
If you get a fading effect like I was having on my question, try to change the Shape value to something like -0.9 on Cycles Hair Settings.

Suggestions are very welcome.


text:
UV Project modifier doesn't line up with background image
I am using a UV Project modifier to add a video to a plane that matches to my camera view. But the image is the wrong aspect, and its dimensions (1080 x 720) don't match my project dimensions (1280 x 720) How do I fix this?

You can simply type the dimensions of the preferred output into the UV Project modifiers Aspect values fields.
If you want the image to be distorted (anamorphic), then enter the scene's dimensions. If you want the image to fit the camera view (and therefore crop the overshoot), use the source image dimensions.


text:
Importing time-dependent mesh
I have recently found that Mathematica (a mathematics software) may export .stl files, which may be used for Blender. This is very good for me because I am interested in mathematics visualization, and this team Mathematica-Blender seems to be most convenient for this purpose. However, I suppose that when working with animations, I will need curves or surfaces which move according to mathematic equations. See for example the figures in the following video:
Film Dimensions, Chapter 4
It is extremely easy to export just one mesh, allowing me to use Blender for mathematics pictures. But for animations, since Blender does not seem to support high mathematics, it would be great to export somehow a time-dependent mesh. Is there something like this available? More concretely, focusing on the Blender problem (and not in Mathematica), is there any file type from which Blender may import a time dependent mesh?
Any idea or suggestion will be welcome.

What are you defining a time-dependent mesh as? A sequence of individual meshes?

@RayMairlot Yes, but all merged into a single document, more or less.

You can use the NewTek MDD and PC2 formats (though you may have to enable their separate addons in the user preferences to get those import/export formats to appear).
This can be used in conjunction with the 'Mesh Cache' modifier to play back a sequence of external meshes:

There also appears to be a script to import .obj sequences as well, which tends to be a more common format, found here at BlenderArtists, but I am not  sure of any potential limitations it may have.


text:
Blender on OS X Sierra 10.12.4 - Menus not working correctly
When I try to use the file menu is sorta, works but not well.  I cannot click on anything if it appears at all.  Sometimes I get Python: INFO_MT_file instead of the file.
I have deleted ~/Library/Application Support/Blender to make sure there is no cruft. I have tried blender versions 2.69, 2.77 and 2.78c - all have the same poor behavior.
Has anybody see this before?  Googling "Blender INFO_MT_file" gives me nada.
A bad version of a python module on my system or something?
Thanks

This just happened again.  It's very weird as the only software affected is Blender.  I am now using High Serria.

Ok, working with some other Mac software I found the following pattern to clean up stale bits that could be causing bad behavior.
So I did the following rm -rf  ~/Library/Caches/Blender/*.  I assume I blew away a few customizations with this as weel.
I will just leave this here and hope it helps someone else.

The issue came back.  This time I unplugged all USB peripherals except my mouse and keyboard and the issue disappered.


text:
Image not rendering correctly
I am doing a very rough render for a school project and when I try to render it it comes out completely different than in the 3d view

I suspect this is because of the yellow/gold dimensions bars on the right but I have no idea what they are or how to change them.

i can't see from the screenshots that you have provided but since you have keyframed the dimensions of an object "the yellowish thing" ... could it be that you re rendering out a frame which is different from the viewport?


text:
Subsurface Between Two Meshes
I'm working on a model of an aircraft that will eventually be animated with details like landing gear doors, and am using a Subsurface Modifier. Most everything is going well, however I've run into a problem:
Whenever I have two separate objects that need to follow the same lines (IE, the landing gear doors), the Subsurface Modifier does NOT apply equally to both objects. If I join the door mesh to the fuselage mesh it's fine, but as soon as I separate the doors from the fuselage it breaks the lines:

Obviously, this is going to be a serious issue. I CAN get around it by applying the Subsurface Modifier FIRST and THEN separate the gear bay doors from the fuselage mesh, however this will then mean working directly with the higher-poly mesh that I'm using the modifier to avoid in the first place.
Is there a way to prevent this from happening when I separate the objects?

I think control loops will help and you might consider uploading the .blend file to PasteAll.org with a link pasted here so people can experiment with different techniques on the model before answering.

A file would really help to understand what you are asking.

Rule #1 of high poly modelling: Never let subsurf do the work for you. If you need a curved shape, model a curved shape. Modelling it all blocky and leaving it up to the subsurf to make the curved shape means you have no control and will run into issues like this.

Try applying a single subdivision level of subsurf to get some more vertices to work with.

Well, I ended up just applying the SubSurf modifier and creating the gear doors from that. Thanks for the input, tho.


text:
Preserving shading after cutting a hole
I'm trying to cut a hole in a mesh to create torpedo tubes on a spacecraft, and am running into a bit of trouble. I can get the hole cut out just fine using Knife Project, the problem, however, is that it completely screws with the shading of the mesh.
Here are the target and pattern meshes:

Here's a detail of the pattern that creates the shape of the outer tube:

and the target mesh:

Now, as I said I can cut the hole in the target mesh just fine. The problem is, I get this:

As you can see, cutting the hole in the mesh throws off the smoothing of the mesh, leading to some odd shading which is just unacceptable.
I'm trying to do this with as few extra polys as possible.

I ended up turning on Auto-Smooth and then making the transition between the sides of the hull and the bottom (specifically, the edge along the bottom of the poly in which the torpedo tube was cut) sharp, and that fixed it. It's not exactly how I wanted the contour to look, but it works.

show an image :) i'm interested to see what was 'acceptable'

@zeffii Added. You'll note I made the transition between the sides of the hull and bottom sharp rather than smooth, and that fixed the shading around the corner and tip of the torpedo tube.

Great, that does indeed appear to look good. Marking Sharp edges + Auto Smooth.

I was actually able to turn off Auto Smooth and just use the Edge Split modifier once I marked that bottom edge sharp. So it definitely had to do with having a smooth transition between the sides and lower hull.

Prior to cutting the new geometry the transitions are smooth because the shading is a function of the average face normals connected to each vertex. Because each of those adjacent face normals is different as you go around the surface of the object, the transition is relatively smooth. It's a cheap but effective trick.
Once you start cutting into a face, you get new geometry which has a number of vertices which are surrounded by faces which have the same face normals, therefore the shading is 'flat' on those sections. The transition from surrounding faces onto that flat area is also abrupt, and more prominent with transitions between quads and triangles.
Read Blender docs about custom normals
possible solutions

A way out of that is to carefully adjust the positions of the new vertices such that they follow the inferred curvature, this doesn't have to be exact. as long as you get away from the faces all having the same normals on that spot.

The dark area just below the blue arrow indicates the flow that your geometry would need to have (seen from the side of that edited face). If you can move the internal vertices to match the curvature you'll get reasonable smoothing.
or adjust the vertex normals to follow the curvature, but (May 2015) this is not exposed to the UI, but can be scripted. Manual changes  might be overwritten by operations such as remove doubles / recalc normals.

Normal Edit modifier.  It takes a vertex group, and an object, and modifies the normals of the vertices in the vertex group to follow as if they eminated from the center of the object (radial) or directionally if you use a mesh object to help guide the normals.

Blender's Proportional Editing feature can help get nice curvature, but you'll have to experiment with it.

So if I'm reading you right, this means that even though the vertices are aligning properly on the plane of that particular poly, I'll need to move them inwards or outwards to fit the curvature that the smoothing is simulating?

The upside of keeping it lowpoly is that any such intervention isn't going to take too long even if you have to manually adjust the verts or faces.  That being said: now i'm wondering if there isn't an add-on for this kind of stuff..

@zeffii probably can be fixed with normal edit modifier copying normals from the original model

I tried using the Normal Edit modifier after turning on Auto-Smooth in mesh options (which it required). However while Radial and Directional fixed the specific problem I was having, it caused serious issues on OTHER parts of the model.
The modifier required me to turn on Auto-Smooth in the mesh options, and I noticed that when I switched from Radial to Directional BEFORE setting a target for Directional, the problem instantly went away.
So it looks like just turning on auto-smooth corrected everything. However I wanted to touch base before I decided to just leave it at that.

Disregard, it was looking ok from some angles but it's definitely not right on others. AND it screws with the Edge Splitting.

sadly, there's a limit to how smooth 'smooth faces' can look on low poly objects. It will never look like a NURBS object :)

I understand that, I'd just like to get correct shading around those torpedo tubes, lol.

Zeffi mentioned surface normals and shading.  Perhaps you want sharp edges where the hull meets the torpedo launcher.  This effect is often achieved using an Edge Split modifier for Sharp edges.  You have to leave the Sharp Edges checkbox checked, and then mark those edges in the mesh editor (Ctrl-E > Mark Sharp).
Another thing that sometimes causes strange shading is if the surface normals are flipped.  You can check that using the 3d View's N-panel Mesh Display > Normals (pick the Face icon).

Already made sure the normals are correct, and making a sharp edge around the torpedo tube made no difference.


text:
Viewport and renderview images vastly different to saved image
I am working on a nebula image using volumetrics and evee. I am following a tutorial and everything works fine until I save the image sequence. The images are almost invisible compared to the viewport and even rendered view.
Here is the viewport image (rendered view):

And here is the rendered result after pushing F12:

If I save the rendered image as .png leaving all render settings at default, this is the result:

The image is there, but it's incredibly faint. If I import the image sequence back into blender for video editing I can adjust the multiply slider under 'Color' and recover a bit of it's original strength, but it eventually blows out.
If it's unclear, my question is, how to get saved images at the same quality as the viewport/render view images.

While I can't grace this process with being an actual "answer", it is a workaround that got the job done:

Having arrived at a working solution in the volumetrics section of the node system, and having it all appearing as I want it in the viewport and the F12, render view window, I inserted a multiply node between the volumetrics workings and the output node. In the image I used 100 as the multiplier but this was entirely arbitrary and arrived at on a trial and error basis by saving out the render and looking at the saved image file. As I say, not really elegant, but it worked.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Pillar coming out darker than other with the same material
I've made a building that looks like this at the moment:

As you can see, the two pillars in the middle of the building are a different color, even though they are both same object using one material. What's going on with my pillars, and how can I fix it?

How did you map the texture to the pillars? Because the texture looks different.


text:
Hide tools in 3D viewport on Blender 2.8
I was wondering if there is a way to turn off these four tools on the 3D viewport:

Thank you!

Yes, just like that. Unfortunately it also hide the new axis thingy next to it, which I like a lot.

thanks, I don't use the axis thingy so I'm good. Thank you!


text:
How to render a new texture image from scene
I am working with a brick texture that looks like this:

(this is only a small section to illustrate)
For my project, I have UV-unwrapped a circle to have a concentric pattern of bricks using this texture, like this:

(this is a screenshot from rendered view)
My problem is that this UV-unwrapping takes a lot of time, and I don't want to have to do the same for other circles in my project that will have the same pattern. So I was thinking that I could render the existing circle from top view and in that way create a new circular texture that I can easy UV-unwrap other circles onto. But to do this, I need the render to look exactly like the original square brick texture. This means I need completely neutral, flat lighting without any influence from the world around or any other lights.
Is there an easy way to render my circle object so that the result has the exact same values as the original texture? Do I need to use traditional rendering for this when I don't want any influence from the scene?
I appreciate any help, thanks!

try the baking feature

You can render the diffuse color viewed from the top
but the color won't exactly be the same unless you set the look in color management to none:
Here is a more detailed answer: render albedo (color passe without shadow)

thank you! will try this very soon.

I can't find the "diffuse color setting" in blender 2.8, where can I find it?


text:
How to inset faces down to edges rather than faces
I'm trying to inset faces so that I end up with a row of edges along the faces, so that I get something like this:

Here of course I just get a really thin row of faces, when I wanted edges...

If you're just wanting to make an edge in the middle:
Simple process: i >> 1 >> Enter >> W >> Remove Doubles:

Please don't scale too close. Just scale a little.
Than select both Vertices and hit Alt + M and select At Center
Step 1:

Step 2:

Result:


text:
Automatically Scale and Export All Files in Directory?
Is there a way to go through every .blend file in a directory and do the following with each:

Open the file.
Move the cursor to 0,0,0
Enter edit mode (there is only 1 object in each file)
Select all vertices
Apply a scale by a constant across all 3 axis
Exit edit mode
Save the file
Export to .fbx

If someone can point me to the recursing/opening/saving and exporting portions of this I can likely get the rest - just not sure how to go about it because I've only made very small hacks to the spacebar hotkey plugin (like adding arc intersection calculators/snap-tos) and am not really familiar with Blender scripting beyond inserting the occasional menu item into a preexisting plugin.
Hoping for something quick and dirty.

Using Python and Unix Shell Scripting
You can accomplish this with some Python scripting and Unix shell code. If you are on a Unix system (macOS or Linux) this won't be a problem. If you are on Windows, you can try Cygwin, but I haven't tried it and the shell script might need some modification.
The first step is to save the following Python script as script.py (or something else) into the same directory as your .blend files:
import bpy
import os

scene = bpy.context.scene
obj = scene.objects.active

#Transform and save
k = 2 #scale constant
bpy.ops.transform.resize(value=(k,k,k))
bpy.ops.object.transform_apply(scale=True)
bpy.ops.wm.save_mainfile()

#copied from the basic export.py template
basedir = os.path.dirname(bpy.data.filepath)
if not basedir:
    raise Exception("Blend file is not saved")
name = bpy.path.clean_name(obj.name)
fn = os.path.join(basedir, name)
bpy.ops.export_scene.fbx(filepath=fn + ".fbx")

print("written:", fn)
Note: This script assumes only one object in the blend file, and won't always work if that isn't the case.
Next, in your Unix shell (terminal, command line, etc.) navigate to the directory that your files are in (cd /path/to/directory/).
Finally, run this script in the shell:
for file in *.blend; do /path/to/blender -b "$file" -P script.py; done

If you are on a Mac, and you installed Blender by copying it to the
Applications folder, then /path/to/blender will be /Applications/blender.app/Contents/MacOS/blender. If you didn't, or are on Linux, it will be wherever you put Blender.
What the shell script does, is iterate through each of the .blend files in the directory, launch Blender, and then execute the Python script on each file.
Note: The console will not give you any feedback until the entire batch is done, at which time it will spit out all of the console logs at once. While it is running, though, you can check the .fbx files it outputs to make sure that everything is working correctly.

Does bpy.ops.object.transform.resize() apply the scaling to vertices (equivalent to pressing S in edit mode) or to the object itself?  I'm trying to have the scale on the objects remain 1 before and after the operation with the actual vertices transformed.

bpy.ops.object.transform.resize() applies the scaling to the object, and then bpy.ops.object.transform_apply(scale=True) applies the scale, setting the scale to 1 while maintaining the current size.

Bad choice of words, sorry. The first command scales the object (like pressing S). The second command applies the scale (like pressing Ctrl + A).

Using only Python and Blender
For clarity and security, I don't overwrite the original files.
This script will check for the scene files (which contain the object). Then, for each file separately, it will append all objects, scale them and save itself as the scaled file version. After that export the .fbx and finally on completion save itself as the original conversion script file.
With the script saved in the file convert.blend. My folder structure looks like this at the start.

Opening the file convert.blend and pressing Run Script the scaled scene files and fbx files will be created.
import bpy, os
import bmesh
import math
import mathutils

def clear_objects():
    for obj in bpy.data.objects:
        bpy.context.scene.objects.unlink(obj)
        obj.user_clear()
        bpy.data.objects.remove(obj)
    for me in bpy.data.meshes:
        me.user_clear()
        bpy.data.meshes.remove(me)

def save_scaled_objects(dir_source, dir_target, dir_fbx, scale = 1):
    dir_root = bpy.path.abspath("//")
    path_origin = bpy.data.filepath

    dir_source = os.path.join(dir_root, dir_source)
    dir_target = os.path.join(dir_root, dir_target)
    dir_fbx = os.path.join(dir_root, dir_fbx)

    files = os.listdir(dir_source)

    scn = bpy.context.scene

    for f in files:
        input_filepath = os.path.join(dir_source, f)
        output_filepath = os.path.join(dir_target, f)
        output_fbx = os.path.join(dir_fbx, os.path.splitext(f)[0] + ".fbx")

        print("DIR",output_fbx)
        # append object data block
        with bpy.data.libraries.load(input_filepath, link=False) as (data_from, data_to):
            data_to.objects = data_from.objects
        #link all objects to current scene
        for obj in data_to.objects:
            if obj is not None:
                scn.objects.link(obj)
                #scale the objects data
                scale = 0.1
                for v in obj.data.vertices:
                    v.co *= scale
        print(output_filepath)
        # saves the file
        bpy.ops.wm.save_mainfile(filepath=output_filepath)
        #export to fbx
        bpy.ops.export_scene.fbx(filepath = output_fbx)

        clear_objects()
    # on completion of all saves, restore the original path of this file
    bpy.ops.wm.save_mainfile(filepath=path_origin)

dir_source = "scn_files"
dir_target = "scn_files_scaled"
dir_fbx = "fbx_export"
save_scaled_objects(dir_source, dir_target, dir_fbx, scale = 0.1)

Linking and Appending
Remove Objects
Base Path, Path Joining, Splitext

Do you know how to enter edit mode, select all vertices and apply the scale from there before exiting edit mode?  It's important that the scale remain 1 on the actual object and the vertices actually be scaled from edit mode.

for v in obj.data.vertices: v.co *= scale; This scales all Vertices, not the object. The objects scale remains whatever it was. It is also faster (and more stable) than using "bpy.ops" and going into edit mode. You don't need edit mode to alter the mesh data in python.


text:
Creating a torus with more than 256 segments with nearly 1km radius?
Is there a reasonably simple way to create a torus with minimal vertices and faces (that is no artifacts from merging extrusions) with more than 256 segments (in my case 1800 major segments and 360 minor segments) with a major radius of about 900m and a minor radius of about 50m?

It is possible, but this kind of heavy geometry may kill your computer. Are you trying to make a hyperrealistic, ultradetailed donut? ;).

Maybe curves would suit you better

The computer has enough power to render many more polygons than that (it's already got a few dozen objects with similar polygon counts and scale on screen) - just trying to find a way to construct it that doesn't add excess vertices or polygons and doesn't involve me selectively filling each face - going for the inside half of the torus with a flat exterior so I'm already going to have to manually fill in 1800 polygons

Start by adding a circle, with 360 vertices, a radius of 50, and the Fill Type set to Nothing.

In edit mode rotate the circle along the Y axis by 90°. Then move the circle 900 along the Y axis.
Last add a Screw modifier, with Steps and  Render Steps set to 1800. Leave all other modifier settings to default.

You now have a torus with 648,000 vertices and faces; 1800 major segments and 360 minor segments.


text:
Quick way to remove thousands of materials from an object?
I've put in about 3 days of work manually editing a mesh (with lots of copying and pasting) to get around the issues of junk vertices with boolean operations in Blender and noticed something troubling.  I started with a single material but after all the edits that single material has multiplied into approximately 20,000 duplicates of the same material, all assigned to separate parts of the same mesh.  I've been clicking away at the - button for awhile and am only up to ~700 deleted materials - is there a way to clear all materials from an object then simply reapply the one I want?

This will remove the materials(except the first) from the object and assign the first material to all the mesh

select the object
run this script :

import bpy

C = bpy.context

for i in range(1,len(C.object.material_slots)):
    C.object.active_material_index = 1
    bpy.ops.object.material_slot_remove()

bpy.ops.object.mode_set(mode = 'EDIT')
bpy.ops.mesh.select_all(action = 'SELECT')
bpy.ops.object.material_slot_assign()
bpy.ops.object.mode_set(mode = 'OBJECT')

It's been running for a good 20 minutes now, how long should I expect it to run for approx 20k materials on a mesh of ~110,000 vertices and ~60,000 faces?

Thanks - it finally finished after about 40 minutes, but well worth not having to click the - 20,000 times.

how can I change this script to removed unused texture instead?

This method takes time under one second if you have 20k materials object.
Select first your multimaterial object then object which has one material.
Click in material panel black arrow > "Copy material to Others".

I ended up doing this to nearly every object in my scene.  This took my laggy stuttering blend file from 207mb down to 5mb -  thank you so much for this solution!

Quick? maybe use clear
import bpy

obj = bpy.context.active_object

materials = obj.data.materials
materials.clear(1)   # 0 will crash, 1 will update as it goes along

that script was a life saver thanks

bpy.ops is full of cooties.  This seems a lot simpler and faster:
import bpy

obj = bpy.context.active_object
mesh = obj.data

while len(mesh.materials)>1:
    mesh.materials.pop()

Blender official 2.74, tested 2 times your script with 14000 materials and Blender crashed both times.

That is disappointing.  It works when I test it on my computer.  If you happen to be able to compile and debug blender from source then there is a chance the crash bug could be fixed.  Otherwise I am not optimistic.


text:
Unusual lines on UV map after using “Difference” to create apertures on a plane
I used the difference procedure to create a “door” and “windows” on a single plane. (placing 3 joined cubes through the plane and using the “difference” modifier to create the apertures) After overlaying the test map the result shows unexpected lines, indicated with yellow lines, on the resulting map. I uploaded the results (Second life) and it appears to look ok.
I could use Loop cuts to get the same result but was wondering if anybody knows what is happening (the unexpected lines) and if this is going to cause issues elsewhere.
I have applied rotation and scale modifier, remove double vertices and reset origin to centre

Concave polygons can create these artifacts, so dont use this method. Use the loop cut tool (Ctrl+R) to define the window's borders, then delete the faces.

Using the Boolean to cut the openings left the object with only 2 faces, Filling in these  Concave Ngons caused the lines you see in the UV space. If you enable the face select mode this will become more obvious.

These Ngons will not be a problem as such once the object is imported into SL as the importer will convert those Ngons to triangles.

But as FFeller suggested using loop cuts is a much better way to go about this simply because you have more control over the geometry:

And having more control means it will be a lot easier to optimize the model ( = Lower LI costs) , easier to create lower LoD models and Physics model later in the process.
So best to avoid Boolean cutting for SL :)

Thank you both for the detailed explanations on this issue - I will certainly be using loop cuts from now on - happy days.

Forgot to mention the optimization by merging non contributing vertices - something else new I have picked up today. Rock on StackExchange !


text:
Open user preferences directly into Add-ons tab
I'm using a script to show the User Preferences dialog:
bpy.ops.screen.userpref_show('INVOKE_DEFAULT')

But it shows the preferences "input" tab, and I want it to show the "Ad-ons" tab. I tried using this:
bpy.types.UserPreferences.active_section

It didn't work. How can I do that?

Could you please provide more details how you actually open the preference window?

Ok I found the command bpy.ops.screen.userpref_show()

You'd want to use
bpy.context.preferences.active_section = 'ADDONS'

I don't know if this is the correct way to do it, but I can tell you that it works..
Just put the name of your addon, as if you were using the search engine
bpy.ops.screen.userpref_show()
bpy.context.preferences.active_section = 'ADDONS'
bpy.data.window_managers["WinMan"].addon_search = "node wrangler"

If you want to open it, try the following code.
case 1 For Blender 3.2
addon_name = __name__.split(".")[0]
preferences = bpy.context.preferences
addon_prefs = preferences.addons[addon_name].preferences

bpy.ops.screen.userpref_show("INVOKE_DEFAULT")
addon_prefs.active_section = 'ADDONS'
bpy.ops.preferences.addon_expand(module = __name__.split(".")[0])
bpy.ops.preferences.addon_show(module = __name__.split(".")[0])

case 2 For Blender 3.2
bpy.ops.screen.userpref_show("INVOKE_DEFAULT")
bpy.context.preferences.active_section  = "ADDONS"
bpy.ops.preferences.addon_expand(module=__package__)
bpy.ops.preferences.addon_show(module=__package__)

Either will work.

When you want to run it somewhere other than under the package.
my_package/
├── __init__.py
└── my_subpackage/
    ├── my_submodule.py

init.py
addon_name = __name__.split(".")[0]

my_submodule.py
from my_package import addon_name

preferences = bpy.context.preferences
addon_prefs = preferences.addons[addon_name].preferences

bpy.ops.screen.userpref_show("INVOKE_DEFAULT")
addon_prefs.active_section = 'ADDONS'
bpy.ops.preferences.addon_expand(module = addon_name)
bpy.ops.preferences.addon_show(module = addon_name)


text:
Render farm: is "pack all" all I need or should I do something more?
I need to send scenes to a render farm, and I know there's an option called "pack all" which saves all the external data into the .blend file.
But is that enough? I was reading about cache files, and I don't know if that's included, or if I have to do something more.

For a simple example, what you suggest should, for the most part, be good.
I'd also like to add the following:

Select Make Paths Relative in case someone wants to unpack the .blend file at a different location.
Double check your output directory.  Does it need to be set to a relative path? Does that path actually exist?
If you're learning in this environment, it's good to test out your render by only rendering the first few frames with a low sample rate and smaller image size so you can get quick feedback in case something goes wrong.
The bvh_* cache files can become quite large.  If your home directory has a small quota, and you have a scratch environment or another drive you can dump them on, then the solution seems to be to remove the cache folder and link it to that other space.

On *nix systems, the cache folder is:
~/.config/blender/<blenderversion>/cache
On Mac, the cache folder is:
~/Library/Application Support/Blender/<blenderversion>/cache
On Windows, I'm not so sure, and I don't know how it changes from one version to the next.
You might want to read through this Blender Stack Exchange entry as well:
How can I change the directory used to cache BVM

Thanks.I'd like to add something I just discovered.  If you don't have 'Cache BVH' checked in the render settings, you won't be generating the aforementioned 'bvh_*' files and your cache shouldn't be filling up.  Though I 've not tested this out yet with running in batch mode, I just discovered it while rendering through the GUI.


text:
How to restore visibility of animation panel?
I did something and animation panel(where key frames) now is hidden.
How to restore visibility of animation panel?

Every portion of the window can be configurated rappresenting an editor, the animation-related windows are: timeline, graph editor, dope-sheet, and NLA editor.

You can create a new portion of window by selecting and dragging the little triangle in the up right angle of every portion of window. Right clic on the separation line between two windows to join them.
Check also the upper header (info window), for default templates of windows organization.

If you have the option "back to previous", click it!


text:
how to interact between diferent scenes in BGE
I have a main scene, where i have my character, rooms... Then I have a scene for healthbar, inventory and all that stuff. And I don't know how to interact between those two scenes. For example: When some sensor is triggered in the main scene, how do I link that with the GUI scene to show some information text or something else?
I know this is probably a very easy question and I should know things like that, but I'm not very experienced with blender game engine, and also I couldn't find zhe answer on the internet.
Thank you for your answers.

So, essentially you're trying to put a scene with your HUD onto your scene with gameplay?

It's not an easy question. Nobody knows how to. Trust me, you can't even make it alternate between layers (although you can store an object in another layer, if you want to clone an object projectile.)

@Nefer007 I wouldn't go so far as to say that... I was just clarifying as to what he was asking

like, add overlay scene?, or, have an event in the main scene trigger something in the HUD?

yes. like if you would to pick up health and healthbar would increse.

should I just make the HUD in the same scene as the character?

Well, yeah, but from experience, if the interwebz fails to have it, it's an issue. The easiest way would be to parent the HUD to the camera, I think. You can quote me on that, but I'm not sure it'll be correct. But you should look at some of the other related questions on the site first.

You can overlay scenes with logic bricks I think. Is that what you want?

In the BGE, some methods can be used to interact whileas others can't. My personal favorite way to interact between scenes is by using messages. I have provided steps and an example on how to create what you are asking for. Considering that I have this ("When some sensor is triggered in the main scene, how do I link that with the GUI scene to show some information text or something else?") as my information to work with, I was not sure of what exactly you wanted.

Steps
(Now knowing exactly what you want, I am not sure if this is your exact situation)
1) With your camera, have an always sensor and a scene actuator to display your HUD:

2) In your hud, select your object that need to be visible and invisible when triggered, and create the following logic:

(This says that when the prop "Show" is true, the object is visible. The object is invisible when the prop is false. When a message "Show" is recieved, it will make the prop True. When a message "DontShow" is recieved, it will make the prop False.)
3) To send the message "Show", select your trigger object and add your logic but make sure the actuator send the message:

4) To make the object that gets triggered invisible, we need an object that sens a message "DontShow":

Product
I am sorry if I was difficult to understand in any of this, and I don't know if I was, so I've created an example .blend which can be found here. For the .blend file, when you collide with the pink object, a green sphere appears in the HUD. When you press Spacebar, it disappears. Hope this helped!

I've read the comments, and it seems that you want to add health in the HUD. You can send a message saying "Add", and the object that receives it adds health points to the property for your health once received.

Thanks a lot. I also checked the blender manual (http://www.blender.org/manual/game_engine/logic/actuators/message.html) and there it says that the alternative to the message actuator would be   bge.logic.globalDict, which i know is used for saving game progress, but I don't know how it could be used for comunicating across scenes.

I was looking on YouTube for a tutorial about editing text objects in bge, and I foud this video: https://www.youtube.com/watch?v=s55R9mIPE1k So that's how you comunicate across scenes using python controller.


text:
How to set collision bounds for Armature object
I made a simple character in blender game engine. He's parented to an armature, so he can walk, ext. Now I want to make him a character, so he can jump, can't go through obstacles, have a step height. I think you do that by setting the armature to Physics type: character. And it kind of works. But the collision bounds are a box, so the character sinks into the ground.
here's a picture

The white box in the middle of a character is his bouning box. How can I fix that? I tried the collision bounds, but it doesn't work. No matter which one I chose, it had no effect whatsoever.
Please help. Thanks!

check the box that says "collision bounds"

you would never really put physics on the armature, make a collision box for him.

checking 'collision bounds' doesn't work, even though it displays it.

what do you mean by 'make a collision box for him'?

make an actual box ie cube, scale it to the collision size you want. Make it a collision object, and parent the armature to the box (ie the box is the armature's parent so it follows the box's physics). Also make it non-renderable.

Yes, I already tried that. I was just wandering if there's a etter way of doing it. Thanks anyways

@RokiPodpecan for that, see this question.

Don't apply the physic to your character's Armature directly as Armatures aren't recognized as an Actual model object but only an unrendered object that makes your character's body part move (rig), If you want to make your character collide with other thing, try this:

Make sure that your char's armature and it's model have No Collision physic assigned.
Then, make a Cube and resize it to match with your Armature/Character's size and Place it around your character, You can rename the Cube as "charbound" if you want.
Set the Cube's physic to Dynamic and then Set the Cube as parent of your Armature (not the entire character).
Move the basic movement control in Logic Bricks from your char's Armature to the Cube, but don't move the Action or other Actuator more than Motion Actuator.
And at last, make the Cube Invisible (physic tab > enable Invisible button) and Box Collision Bound.

If you want to make him "jump", try using Servo Control Motion Actuator in Game Logic. by adding Z-axis Linear Velocity, Enabled Z-axis Movement and Adjust Z-axis Max/Min speed value then it would jump, make sure you activate the Collision Bounds on Physic Tab. Alternatively, you can use Character Motion Actuator and Enable "Jump" toggle there (Actually, I've never tried it. But I'm sure it can).

I moved to unreal engine 4 since i posted this question so it's no longer relevant for me, but thank you nonetheless. Maybe someone else will find it helpful.

Ahaha, I know someone my end up on giving up option other than continuing works with blender game engine. Anyway, may your game became the best game.


text:
Hidden materials issue
In my model, I have 4 objects that share 2 different materials.
However, when exporting to Unity, the first object has the correct 2 materials, the second object has 3 materials, third object has 4 materials etc.
However, only 2 materials show up in Blender. It managed to have it working before, so there must be something I did that causes the hidden materials to show up.
Any ideas how to fix this?

If you upload the .blend to PasteAll.org and paste the link here I'm sure someone will be able to diagnose the issue and have an answer posted soon after.

Did you ever find a solution to this? I'm having the same exact issue. The entire mesh is only using a single material in blender, but when importing into Unity, unity keeps automatically adding additional material to the material array of the mesh.

authors: Нестор Филлипов


text:
Why are Render Result and Viewer Node listed as drop down options for Texture sources?
To reiterate the question: Why are Render result and Viewer Node outputs listed in the drop down options for texture sources in the Image Textures for both Blender Render and Cycles?
I have tried them as possible sources, and they are not functional as a source, even though in an ideal situation they could be used as adjustment or compositing previews for texture painting tasks.

That editor is called UV & Image Editor not texture editor. They are not being listed as texture sources, simply as possible image preview source. Weather you use them for unwrapping over or not is up to you, though it might seem to make little sense.

What is your question? How to change this?

No, all images in Blender are treated as textures - I know this from extensive study of the texture paint work flow. My point is that if an option is not to be used or is unavailable it is greyed out and not capable of being selected. If it is only to be used as an option in the UV Image Editor, then any reference in the the Materials tab should be greyed out as not assignable. This had to have been by design since it was carried over from Blender Render to Cycles. My question is to WHY if it is not meant to be used - better to eliminate the option if not usable.

May be a bug, or an oversight by the developers. Who knows?

That is my hope, that by posting here in Stack that the question will be seen by devs and possibly addressed either as something that needs a bug report filed or as a problem to address in 2.8 series.


text:
Can you set a driver to control something based on the Brush Pressure?
I am trying to see what is possible with drivers, and the main test I am looking at right now is about setting up a driver to change an aspect of a brush texture based on the strength of the brush. To access the driver, I had placed the brush texture in a material on a mesh object and did the driver set up there. In no way did I get anything to work - but was wondering if anyone has had any luck with this ever and could give some advice?
If I can get it to work, then I'd like to go so far as to use the brush pressure on strength to change frame number so the brush image sequence brush could follow the pressure placed and shift images.
I already have no problem with key framing values in the brush texture and playing those back or scrubbing the timeline, and I also use the timeline to scrub through images in a sequence used as a brush texture or brush mask texture. I just really want to be able to add a driver in some instances so I can change more organically.


text:
How do I get the image index that matches the material texture? I see that the index order changes depending on the image name
I have used a small script that Atom had published online, and it uses the index 0 for the image editor to then get the sizes of the image for setting render resolution. That art works great until you have more images loaded in blender, and then the index order may have changed. I want to get the index that matches the selected object's texture so that the operation doesn't mess up and use the wrong pixel resolution.
Any ideas here?
image_index = 0
    rnd = bpy.data.scenes[0].render
    rnd.resolution_x, rnd.resolution_y = bpy.data.images[image_index].size[:]

Assuming the image of interest is on the first texture of the first material of the active object and you're using the Blender Internal (BI) render engine (not cycles):
import bpy

print( bpy.context.active_object.data.materials[0].texture_slots[0].texture.image.size[:] )

import bpy
print(bpy.context.active_object.data.materials[0].texture_slots[0].texture.image.size[:])    I added the last parentheses and deleted the space behind the first, but thank you, that makes things much easier.


text:
Why is symmetry not working in Texture Paint with my posed character?
I have a model that I am using texture paint on and I have it posed with an armature. I turned on Texture Paint and have been painting along and realized that some things are not lining up, so I backtracked to document this for others. Here you can see the initial problem with a multiresolution model being painted while in pose and the way the paint doesn't seem to respect the placement regardless of the use of symmetry in paint.

After trial and error I discovered that by turning off visibility in the armature modifier, the symmetry goes back to working. This taught me that the painting symmetry is based on the global coordinates and original position, not the pose it happens to be in.
If using Texture Paint with symmetry, toggle the visibility of the armature modifier off for the session unless the misalignment is intentional.

Thank you for posting this question. I encountered a similar problem too, here is what I found:
I don't have any modifier on my model but the symmetry texture paint is still off. So I apply All Transforms to my models' parts in object mode by clicking ctrl A. Then the symmetry texture painting work like a charm.


text:
FBX Export: How to merge animations of two different objects with both a different armature?
I have a problem, I modelled and rigged a gun inside of Blender. Then merged it with some hands that were already rigged. I animated them inside of Blender with the Dope Sheet on Action mode.
To have them play the same animation together, I need to select both armatures and select the same animation and press play. If I only select one armature and change the 'action' they both play a different action.
This Is not the biggest problem.
I want to import my model and animation to Unity, I use FBX to do that since it is the best possible option. Now to clarify some extra things, I have made 2 animations. One for firing, the other for idle.
Exporting it to FBX and importing it inside of Unity, gives me 4 animations.

I can not animate them correctly this way, since Unity doesn't allow for 2 animations to be played at the same time. (Well they do, but this requires a lot of extra trickery to get it right. Since I'm also blending the animation for it to look smooth.)
How do I get Blender to get the animations together into one?
I've thought about not using the action editor and just animating one after another and splitting it inside of Unity. But I think that would generate two animations instead of one. How would I do this?
Thanks in advance.

you could join the armatures


text:
Blender not showing objects in render?
I'm rendering an animation and I've got a peculiar problem. It seems like Blender is rendering in chunks.
At one moment in the render, there's just a bit of the objects visible.
But then at about frame 40, everything else pops in. I am using the Blender renderer
I am not quite sure how to explain it, so here is an example:
http://stepperman.me/weird_render.mp4
It's just a camera moving forward. So I'm not quite sure what's going on?

Oh. There was a huge cube in the center that was invisible for some reason, but nothing renders behind it. Very weird. I removed the cube and it was fixed.

You should probably accept your own answer, so that others know it is closed.


text:
Bevel Gear Creation
I need to create a set of bevel gears for a Shay locomotive in a Sketchup project I am working on, and I was wondering if there is a Blender tutorial for this? Thanks in advance for any help you may give.

enable extra objects addon , then you can add gears through Alt+A

@Chebhou Shift+A, Alt+A plays the timeline


text:
Making grass. Difference between hair particles and emitter?
In many tutorials and books I read that making grass is better in hair particle mode, but can not find why. Emitter works much faster than hair type.
I try to achieve similar result with hair and emitter in the same scene. The first image was made using hair (grass and forest):

The second image was made using emitter:

I understood only one thing, the emiter isn't as detailed as hair.
What else?

This promotional video has some relevant information.

Generally, hair is recommended because you can use Cycles particle hair options to get a decent grass shape. It can also be softer on performance due to Children. However, Emitter pulls ahead when you have a diverse set of grass objects. Load them into a Group, and have the particle system use the Group option. This gives better look and performance (assuming you have good grass assets), but requires more work to set up.
Overall, both options work and have their uses. As far as I can tell, hair is commonly recommended in tutorials because Blender Guru put out a good tutorial for Hair grass some time ago, and so the method caught on.

Interesting.. I often use hair particles with a group of grass objects instead of strand rendering. So sort of in-between these two approaches :P I've never really tested to see if there is a difference performance..


text:
How to Texture Paint on an Object using Local Symmetry of Another Intersecting Object?
Watching a tutorial online for Substance Painter's new tools, I was intrigued by the way they can use a secondary widget to define the orientation of an object's symmetry such that they can move the widget and then paint a symmetrical shape on the object's surface. This is similar to how our paint system uses the optional X, Y and Z axis for symmetry painting. Is there a possible work around in Blender already that I have missed?

I saw a Kent Trammel video on youtube that partially gave clues to how this might be possible, so I set up a basic scene in 2.8 to try my hand at applying the sculpting workaround to Texture Paint. You can see the normal symmetry painting there in the first screen.
I then turn on Face select mask mode and select the faces I want to paint on.
I go to edit mode and shift-s snap cursor to selection(this is where we will bring in another object as a helper)
I then scale the Plane object down once we have it in place - the local coordinates of this object are what we will use to get our symmetry set up.
I modified the plane in edit mode to extrude after creating the two loopcuts - these will be a cross that will help see the center of symmetry.
Select your paint object and then shift-select your helper object(the plane) and join them(ctrl-j)You will lose subdivision modifier, and will need to add it back before painting.
In edit mode, select the edge of the helper mesh and select linked(L) to select all of it, and use separate by selection.
Set the Helper object to Wire draw type in the Object Properties, and you can also turn off ability to render it in the Outliner.
Select your paint object and return to Texture Paint mode (Face Select Masking on to avoid painting on the opposite side of the object) and paint your desired design - here i test with just a cartoon face, as if Suzanne has a poorly made tattoo on her face like a rap artist. Painting one side of the cross hairs gets me the symmetrical result on the other side based on the helper object's local orientation.
After you are done, you can turn off Face Select masking and go back to Object mode and apply Location, Rotation and Scale to return the object origin to center of the paint object.


text:
How to get the correct size of the image texture in Blender 2.8 with python?
Mutant Bob already helped me a few years ago back when I was dealing with Blender Internal materials, but now I am stuck - how do I get the image size from the active image texture now that we are dealing with nodes with Cycles and Eevee?
example from before:
bpy.context.active_object.data.materials[0].texture_slots[0].texture.image.size[:]

Related

Thank you, I will try to figure out how to apply that and post the working code here.

n.image is the image used by the texture node. Its size is n.image.size[:] as prior.

Based on batFINGER's response, this ended up being the solution.
#-----------------------------cameraview paint

class PAINT_OT_CameraviewPaint(bpy.types.Operator):

    bl_idname = "image.cameraview_paint"
    bl_label = "Cameraview Paint"
    bl_options = { 'REGISTER', 'UNDO' }

    def execute(self, context):

        scene = context.scene

        #toggle on/off textpaint

        obj = context.active_object

        if obj:
            mode = obj.mode
            # aslkjdaslkdjasdas
            if mode == 'TEXTURE_PAINT':
                bpy.ops.paint.texture_paint_toggle()

        #save selected plane by rename
        bpy.context.object.name = "canvas"

        #variable to get image texture dimensions - thanks to Mutant Bob http://blender.stackexchange.com/users/660/mutant-bob
        #node solution from batFINGER

        for ob in bpy.context.scene.objects:
            for s in ob.material_slots:
                if s.material and s.material.use_nodes:
                    for n in s.material.node_tree.nodes:
                        if n.type == 'TEX_IMAGE':
                            select_mat = n.image.size[:]
                            #print(obj.name,'uses',n.image.name,'saved at',n.image.filepath)

        #add camera
        bpy.ops.object.camera_add(view_align=False, enter_editmode=False, location=(0, 0, 0), rotation=(0, 0, 0))
        #ratio full
        bpy.context.scene.render.resolution_percentage = 100

        #name it
        bpy.context.object.name = "Canvas View Paint"

        #switch to camera view
        bpy.ops.view3d.object_as_camera()

        #ortho view on current camera
        bpy.context.object.data.type = 'ORTHO'
        #move cam up in Z by 1 unit
        bpy.ops.transform.translate(value=(0, 0, 1), constraint_axis=(False, False, True), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)

        #found on net Atom wrote this simple script

        rnd = bpy.data.scenes[0].render
        rnd.resolution_x, rnd.resolution_y = select_mat

        rndx = rnd.resolution_x
        rndy = rnd.resolution_y

        if rndx >= rndy:
            orthoscale = ((rndx - rndy)/rndy)+1

        elif rndx < rndy:
            orthoscale = 1

        bpy.context.object.data.ortho_scale = orthoscale

        bpy.context.selectable_objects

        #deselect camera
        bpy.ops.object.select_all(action='TOGGLE')

        #select plane
        bpy.ops.object.select_all(action='DESELECT')
        ob = bpy.data.objects["canvas"]
        bpy.context.view_layer.objects.active = ob

        #selection to texpaint toggle
        bpy.ops.paint.texture_paint_toggle()

        return {'FINISHED'}


text:
thumbnail asset library is not showing blender 4.3
I created an asset library using Grease Pencil, and I recently installed Blender 4.3. However, the asset I created in Blender 4.3 is not appearing in the asset library. How is this possible, and how can I fix it?

There is a lot of information that is missing here. Is your entire asset not appending when you pull it out of the asset browser or is it just your thumbnail that is missing? If it is just your thumbnail did you try troubleshooting with this method?

Only the greasepencil assets are not showing when I make them in blender 4.3, if I make it in blender 4.2 it shows it correctly. Thumbnails for assets from models made in blender 4.3 are shown correctly. (I guess i am going to use blender 4.2 for greasepencil).


text:
Geometry nodes, how to create mesh lines from origin to vertex points on circle
I created a circle using Geometry Nodes and placed an instance on the vertices. The number of vertices can be adjusted. Now I want to create a line from the origin to each vertex on the circle, so if the number of vertices is set to 5, there will also be 5 lines. How can I achieve this in Geometry Nodes?

Instead of just "dots" (mesh circle), you can instance a jointed mesh line with this circle, using the curve tangent and the Rotation socket of the Instance on Points node to align the mesh line towards the main circle center.

Cone with 0 height

Maybe Extrude vertices, with negative offset.

Hint, instead of a "value", it's possible to use the negative "position" (multiplied by "vector math") plugged to the "offset". This would expand the solution work in cases where you don't create the geometry or don't have a value due to  the creation complexity.

You can use a 0-height cone to produce that:

Imgur mirror (SE image hosting has problems)


text:
How can I get the normal orientation of an edge
I need to get the Normal orientation of an edge and apply it to a new object:
obj = bpy.data.objects['Edge']
mat = obj.matrix_world
# Decompose object in location, rotation, scale
loc_obj, rot_obj, scl_obj = mat.decompose()

The method above give me the Global orientation:

Is it possible to get a matrix containing the Normal orientation in the rot_obj component?

Thanks

The desired normal orientation is not unique. In your last picture any orientation with same y(the green one) can be a valid solution. Can you provide more constraints?